moved regex escape function to utils