added escaping of characters in regex