single quotes in regex were not working