@@ -1187,7 +1187,7 @@ There are two variants: lookahead and lookbehind assertions.
1187
1187
Technically, anchors are also zero-width assertions, and they can look
1188
1188
both ahead and behind.
1189
1189
1190
- = head2 X « Lookaround assertions|regex,positive lookaround assertion;regex,negative lookaround assertion »
1190
+ = head2 X « Lookaround assertions|regex,positive lookaround assertion, <?> ;regex,negative lookaround assertion, <!>; regex ?[ »
1191
1191
1192
1192
Lookaround assertions work both ways. They match, but they don't consume a
1193
1193
character.
@@ -1219,7 +1219,7 @@ negative lookaround assertion behaves in the same way. In the fourth
1219
1219
statement the last digit is matched but not consumed, thus the match includes
1220
1220
only the first two digits.
1221
1221
1222
- = head2 X < Lookahead assertions|regex,before >
1222
+ = head2 X « Lookahead assertions|regex, before;regex, <?before> »
1223
1223
1224
1224
To check that a pattern appears before another pattern, use a
1225
1225
lookahead assertion via the C < before > assertion. This has the form:
@@ -1269,7 +1269,7 @@ that are followed by a unit (like I<kg>), but not other numbers:
1269
1269
Since the lookahead is not part of the match object, the unit
1270
1270
is not substituted.
1271
1271
1272
- = head2 X < Lookbehind assertions|regex,after >
1272
+ = head2 « Lookbehind assertions|regex, after; regex, <?after>»
1273
1273
1274
1274
To check that a pattern appears after another pattern, use a
1275
1275
lookbehind assertion via the C < after > assertion. This has the form:
@@ -1894,6 +1894,7 @@ pattern, which may be summarized as follows:
1894
1894
1895
1895
= end table
1896
1896
1897
+ X < |regex, $variable > X < |regex, $(code) >
1897
1898
Let's start with the first two syntactical forms: C « $variable » and C « $(code) » .
1898
1899
These forms will interpolate the stringified value of the variable or the
1899
1900
stringified return value of the code literally, provided that the respective
@@ -1969,6 +1970,7 @@ interpolation. Hence, in general, after possible stringification, C«$variable»
1969
1970
and C « $(code) » provide for a strictly literal match of the variable or return
1970
1971
value.
1971
1972
1973
+ X « |regex, <$variable> » X « |regex, <{code}> »
1972
1974
Now consider the second two syntactical forms from the table above:
1973
1975
C « <$variable> » and C « <{code}> » . These forms will stringify the value of the
1974
1976
variable or the return value of the code and interpolate it as a regex. If the
@@ -2019,6 +2021,7 @@ The use of hashes in regexes is reserved.
2019
2021
2020
2022
= head2 Regex boolean condition check
2021
2023
2024
+ X « |regex, <?{}>;regex, <!{}> »
2022
2025
The special operator C « <?{}> » allows the evaluation of a boolean expression that
2023
2026
can perform a semantic evaluation of the match before the regular expression
2024
2027
continues. In other words, it is possible to check in a boolean context a part
0 commit comments