Check regular expression