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.