create regular expression only once