That \1\2 are literal bytes. You would do:
$regexp = '/^(.*?)(?=\x01\x02)/s';
But those bytes are not present in the original wikitext, they are set
by ExtractFormatter
$html = preg_replace( '/\s*(<h([1-6])\b)/i',
"\n\n" . self::SECTION_MARKER_START . '$2' .
self::SECTION_MARKER_END . '$1',
$html);
Best regards
PS: These are section names, not edit summaries.
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.wikimedia.org_mailman_listinfo_mediawiki-2Dapi&d=DwIGaQ&c=slrrB7dE8n7gBJbeO0g-IQ&r=v6T2EyE4KveT7ULVWpZKEQ&m=3ifKD97b-oU21yT3FsgrNa_MYPjLADy0HJTfStT5SoQ&s=mHorhY1TsQMyQABupg-HuaEIRMc8ZKmX3zhn9u1o0a4&e=