Meta Regex Engine
Jun 26, 2023
Given the pattern:
const1.complex1.const2.complex2…
that is a pattern that has at top level simple and complex pieces
Instead match this:
const1.*?const2.*?…
That is ignoring content of complex sub-expressions.
Then the validate step — run sub engines on each of the pieces requiring it to match the fulll exact slice.
2nd variation:
complex1.const1…
Here we handle the first one differently — match backwards from the start of const1.
This case is actually more important.