File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -475,6 +475,19 @@ the lexical ordering in the regexes.
475
475
476
476
say ('abc' ~~ / a | .b /).Str; # OUTPUT: «ab»
477
477
478
+ = head1 X < Conjunction: C < && > |regex,&& >
479
+
480
+ Matches successfully if all `&&`-delimited segments match the same substring
481
+ of the target string. The segments are evaluated left to right.
482
+
483
+ This can be useful for augmenting an existing regex. For example if you have
484
+ a regex `quoted` that matches a quoted string, `/ <quoted> && <-[x]>* /`
485
+ matches a quoted string that does not contain the character `x`. Note that you
486
+ cannot easily obtain the same behavior with a look-ahead, because a look-ahead
487
+ doesn't stop looking when the quoted string stops matching.
488
+
489
+ = head1 X < Conjunction: C < & > |regex,& >
490
+
478
491
= head1 Anchors
479
492
480
493
The regex engine tries to find a match inside a string by searching from
You can’t perform that action at this time.
0 commit comments