Fix bug using PCRE_MULTILINE with a caret

Replace RN to N for patterns with PCRE_MULTILINE modifier.