public function getCompiledRegexForPregReplace(array $regexes, $additionalModifiers = '')
{
// the \G is not strictly necessary, but it makes preg_replace abort early when not lexable
return '~\\G((' . str_replace('~', '\\~', implode(')|(', $regexes)) . '))~' . $additionalModifiers;
}