Concept Flow - Lookahead and lookbehind
Start regex engine
Check lookbehind condition
Yes
Match main pattern
Check lookahead condition
Yes
Accept or reject match
The regex engine first checks the lookbehind condition before the main pattern, then matches the main pattern, and finally checks the lookahead condition after the main pattern to decide if the match is accepted.