File tree Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Expand file tree Collapse file tree 1 file changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,9 @@ instead.
31
31
Whitespace in regexes is generally ignored (except with the C < :s > or,
32
32
completely, C < :sigspace > adverb).
33
33
34
- As with Perl 6, in general, comments in regexes start with a hash character
35
- C < # > and go to the end of the line.
34
+ As with Perl 6, comments work as usual in regexes.
35
+
36
+ / word #`(match lexical "word") /
36
37
37
38
= head1 Literals
38
39
@@ -84,6 +85,20 @@ This doesn't match:
84
85
85
86
because there's no character to match before C < per > in the target string.
86
87
88
+ Note that C < . > now does match B < any > single character, that is, it matches
89
+ C < \n > . So the text below match:
90
+
91
+ my $text = qq:to/END/
92
+ Although I am a
93
+ multi-line text,
94
+ now can be matched
95
+ with /.*/.
96
+ END
97
+ ;
98
+
99
+ say $text ~~ / .* /;
100
+ # OUTPUT «「Although I am amulti-line text,now can be matchedwith /.*/」»
101
+
87
102
= head2 Backslashed, predefined character classes
88
103
89
104
There are predefined character classes of the form C < \w > . Its negation is
You can’t perform that action at this time.
0 commit comments