run regex once, using the PCRE_MULTILINE modifier; see #878