Removed regex flag from compiled regex check