use string for pattern instead of using a compiled regex

- because the compiled regex may add flags that can not be parsed with
  older versions of Perl