check regular expression