@@ -31,7 +31,7 @@ delimiter would clash with the use of adverbs; accordingly, such use of the
31
31
colon is forbidden. Similarly, parentheses cannot be used as alternative regex
32
32
delimiters, at least not without a space between C < m > or C < rx > and the
33
33
opening delimiter. This is because identifiers that are immediately followed by
34
- parentheses are always parsed as a subroutine call. I.e. in C < rx() > the L < call
34
+ parentheses are always parsed as a subroutine call. For example, in C < rx() > the L < call
35
35
operator|/language/operators#postcircumfix_(_) > C < () > invokes the subroutine
36
36
C < rx > . The form C < rx ( abc ) > , however, I < does > define a Regex object.
37
37
@@ -43,12 +43,12 @@ operators:
43
43
$match = m/.+/; say $match; say $match.^name; # OUTPUT: «「abc」Match»
44
44
$match = /.+/; say $match; say $match.^name; # OUTPUT: «/.+/Regex»
45
45
46
- Whitespace in literal regexes is ignored insofar as the
47
- L < C < :sigspace > adverb|/language/regexes#Sigspace> is not used to make whitespace
46
+ Whitespace in literal regexes is ignored unless the
47
+ L < C < :sigspace > adverb|/language/regexes#Sigspace> is used to make whitespace
48
48
syntactically significant.
49
49
50
50
In addition to whitespace, comments may be used inside of regexes to improve
51
- their readability and comprehensibility just as in Perl6 code in general. This
51
+ their readability and comprehensibility just as in Perl 6 code in general. This
52
52
is true for both L < single line comments|/language/syntax#Single-line_comments >
53
53
and L < multi line/embedded comments|
54
54
/language/syntax#Multi-line_/_embedded_comments > :
@@ -78,7 +78,7 @@ In its simplest form a regex comprises only literals:
78
78
/Καλησπέρα/; # "Good evening" in Greek
79
79
80
80
If you want a regex to literally match one or more characters that normally act
81
- as metacharacters, these characters must either be escaped using a backslash, or
81
+ as metacharacters, those characters must either be escaped using a backslash, or
82
82
be quoted using single or double quotes.
83
83
84
84
The backslash serves as a switch. It switches a single metacharacter into a
@@ -98,7 +98,7 @@ comma this will work:
98
98
99
99
while this will fail:
100
100
= for code :skip-test<deliberate error>
101
- / , /; # !! error: a yet meaningless/unrecognized metacharacter
101
+ / , /; # !! error: an as- yet meaningless/unrecognized metacharacter
102
102
# does not automatically match literally
103
103
104
104
While an escaping backslash exerts its effect on the next individual character,
0 commit comments