We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 09b2310 commit 3206fecCopy full SHA for 3206fec
doc/Language/regexes.pod6
@@ -351,6 +351,10 @@ write the backslashed forms for character classes between the C<[ ]>.
351
/ <[02468]> /;
352
# because the first one also contains "weird" unicodey digits
353
354
+You can use C<\> to escape characters that would have some meaning in the regular expression:
355
+
356
+ say "[- hey -]" ~~ /<-[ \- \] [ \s ]>+/; # OUTPUT: «「hey」»
357
358
To negate a character class, put a C<-> after the opening angle:
359
360
say 'no quotes' ~~ / <-[ " ]> + /; # matches characters except "
0 commit comments