Test, validate and match regular expressions
Matches XWiki heading syntax line-by-line, capturing leading indentation (group 1), the opening equals signs split across two groups (2 and 3), the heading text (group 4), and an optional closing equals run plus trailing whitespace (groups 5-7). Splitting the '=' sequences lets a replacement inject one extra '=' on each side, demoting the heading to a lower level (e.g., '= Title =' becomes '== Title =='). Useful for migration scripts or macros that batch-adjust XWiki page heading levels.