fix a regex pattern to work with recent PCRE