A meta regular expression is the intersection or subtraction of 2 other (meta or simple) regular expressions.
Lookaround constructions are transformed in equivalent meta simple regular expressions for processing.
A(?=B)C is transformed into AC ∩ AB.*
A(?!B)C is transformed into AC - AB.*
In the case of more than one lookaround, the transformation is applied recursively.
This works if A is of known length
Only top level lookarounds that are part of a juxtaposition are permitted, i.e. they are no allowed inside
parenthesis, nested or as members of a conjunction. Examples:
Allowed:
A(?!B)C
(?!B)C
Not allowed:
(?!B)|B part of a conjuction
(?!(?!B)) lookaround inside lookaround
(A(?!B))B lookaround inside parenthesis
A meta regular expression is the intersection or subtraction of 2 other (meta or simple) regular expressions. Lookaround constructions are transformed in equivalent meta simple regular expressions for processing.
A(?=B)C is transformed into AC ∩ AB.* A(?!B)C is transformed into AC - AB.*
In the case of more than one lookaround, the transformation is applied recursively.
This works if A is of known length
Only top level lookarounds that are part of a juxtaposition are permitted, i.e. they are no allowed inside parenthesis, nested or as members of a conjunction. Examples:
Allowed: A(?!B)C (?!B)C
Not allowed: (?!B)|B part of a conjuction (?!(?!B)) lookaround inside lookaround (A(?!B))B lookaround inside parenthesis
NOTE: Only lookahead is currently implemented