Replacing regexps string with pre-compiled ones