Fixed bug with matching regex.