Concept Flow - Capturing groups and backreferences
Start regex
Find ( ) capturing group
Match pattern inside group
Store matched text
Use backreference \1 to match same text again
Full pattern matched?
No→Fail
Yes
Return match with captured groups
The regex engine finds text matching the pattern inside parentheses, stores it, then uses \1 to match the same text again.