@@ -546,6 +546,14 @@ say so $str ~~ / scan $$/; # False (there is a . between "scan"
546
546
say so $str ~~ / '."' $$/; # True (at the last line)
547
547
= end code
548
548
549
+
550
+ = head2 X « C « <|w> » and C « <!|w> » , word boundary|regex, <|w>;regex, <!|w>»
551
+
552
+ If you want to match any word boundary you can use C « <|w> » . This is similar to other
553
+ languages’ X « C < \b > |regex depreciated,\b» .
554
+ To match not a word boundary, use <!|w>, similar to other languages X < C < \B > |regex depreciated, \B > .
555
+ These are both zero width assertions.
556
+
549
557
= head2 X <<< <C <<< << >>> and C <<< >> >>> , left and right word boundary|regex,<<;regex,>>;regex,«;regex,» >>> >
550
558
551
559
C <<< << >>> matches a left word boundary: it matches positions where there
@@ -556,13 +564,6 @@ C<<< >> >>> matches a right word boundary: it matches positions where there
556
564
is a word character at the left and a non-word character at the right (or
557
565
the end of the string).
558
566
559
- = head2 X « C « <|w> » and C « <!|w> » , word boundary|regex, <|w>;regex, <!|w>»
560
-
561
- If you want to match any word boundary you can use C « <|w> » . This is similar to other
562
- languages’ X « C < \b > |regex depreciated,\b» .
563
- To match not a word boundary, use <!|w>, similar to other languages X < C < \B > |regex depreciated, \B > .
564
- These are both zero width assertions.
565
-
566
567
my $str = 'The quick brown fox';
567
568
say so $str ~~ /br/; # True
568
569
say so $str ~~ /<< br/; # True
0 commit comments