Skip to content

Commit a8ba900

Browse files
authored
Add some qualifications on the info
1 parent 6c97c45 commit a8ba900

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/Language/regexes.pod6

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1612,7 +1612,7 @@ backslash C<\> or included in quotes:
16121612
16131613
Note that the matching restrictions generally only apply to the left-hand side of the
16141614
substitution expression, but some special characters or combinations of them may need
1615-
to be escaped. For example
1615+
to be escaped in the right-hand side (RHS). For example
16161616
16171617
$_ = 'foo';
16181618
s/foo/\%(/;
@@ -1624,7 +1624,9 @@ or escape the '(' instead for the same result
16241624
.say # OUTPUT: «%(␤»
16251625
16261626
but using either character alone does not require escaping. Forward slashes will need
1627-
to be escaped, but escaping alphanumeric characters will cause them to be ignored.
1627+
to be escaped, but escaping alphanumeric characters will cause them to be ignored. (NOTE:
1628+
This RHS limitation was only recently noticed and this is not yet an exhaustive list of all characters
1629+
or character pairs that require escapes for the RHS.)
16281630
16291631
By default, substitutions are only done on the first match:
16301632

0 commit comments

Comments
 (0)