Skip to content

Commit fae109f

Browse files
committed
Put the two word boundary sections in the proper order
1 parent 58c17eb commit fae109f

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

doc/Language/regexes.pod6

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,14 @@ say so $str ~~ / scan $$/; # False (there is a . between "scan"
546546
say so $str ~~ / '."' $$/; # True (at the last line)
547547
=end code
548548
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+
549557
=head2 X<<<<C<<< << >>> and C<<< >> >>>, left and right word boundary|regex,<<;regex,>>;regex,«;regex,»>>>>
550558
551559
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
556564
is a word character at the left and a non-word character at the right (or
557565
the end of the string).
558566
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-
566567
my $str = 'The quick brown fox';
567568
say so $str ~~ /br/; # True
568569
say so $str ~~ /<< br/; # True

0 commit comments

Comments
 (0)