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 94bdf62 commit 69cdc07Copy full SHA for 69cdc07
doc/Language/regexes.pod6
@@ -1264,10 +1264,10 @@ There are four ways you can interpolate a string into regex as a pattern.
1264
That is using C«$pattern», C«$($pattern)», C«<$pattern>» or
1265
C«<{$pattern.method}>».
1266
1267
- my $text = 'camelia';
1268
- my $pattern0 = 'camelia';
1269
- my $pattern1 = 'ailemac';
1270
- my $pattern2 = '\w+';
+ my Str $text = 'camelia';
+ my Str $pattern0 = 'camelia';
+ my Str $pattern1 = 'ailemac';
+ my Str $pattern2 = '\w+';
1271
1272
say $text ~~ / $pattern0 /; # OUTPUT: «「camelia」»
1273
say $text ~~ / $($pattern0) /; # OUTPUT: «「camelia」»
0 commit comments