Skip to content

Commit 68ce332

Browse files
committed
perlrecharclass: minor clean-up of "Extended Bracketed Character Classes"
- `use re 'strict` -> `use re 'strict'` - delete/add some commas - link `use locale` to locale.pm
1 parent 9f37e11 commit 68ce332

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pod/perlrecharclass.pod

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ This will match all the digit characters that are in the Thai script.
10401040
This feature became available in Perl 5.18, as experimental; accepted in
10411041
5.36.
10421042

1043-
The rules used by L<C<use re 'strict>|re/'strict' mode> apply to this
1043+
The rules used by L<C<use re 'strict'>|re/'strict' mode> apply to this
10441044
construct.
10451045

10461046
We can extend the example above:
@@ -1069,7 +1069,7 @@ There is one unary operator:
10691069

10701070
! complement
10711071

1072-
All the binary operators left associate; C<"&"> is higher precedence
1072+
All the binary operators left associate; C<&> is higher precedence
10731073
than the others, which all have equal precedence. The unary operator
10741074
right associates, and has highest precedence. Thus this follows the
10751075
normal Perl precedence rules for logical operators. Use parentheses to
@@ -1102,7 +1102,7 @@ All the other escapes accepted by normal bracketed character classes are
11021102
accepted here as well.
11031103

11041104
Because this construct compiles under
1105-
L<C<use re 'strict>|re/'strict' mode>, unrecognized escapes that
1105+
L<C<use re 'strict'>|re/'strict' mode>, unrecognized escapes that
11061106
generate warnings in normal classes are fatal errors here, as well as
11071107
all other warnings from these class elements, as well as some
11081108
practices that don't currently warn outside C<re 'strict'>. For example
@@ -1120,7 +1120,7 @@ raised, as the result is not Unicode-defined. No such warning will come
11201120
when using this extended form.
11211121

11221122
The final difference between regular bracketed character classes and
1123-
these, is that it is not possible to get these to match a
1123+
these is that it is not possible to get these to match a
11241124
multi-character fold. Thus,
11251125

11261126
/(?[ [\xDF] ])/iu
@@ -1133,7 +1133,7 @@ hence both of the following work:
11331133
/(?[ [:word:] - [:lower:] ])/
11341134
/(?[ [[:word:]] - [[:lower:]] ])/
11351135

1136-
Any contained POSIX character classes, including things like C<\w> and C<\D>
1136+
Any contained POSIX character classes, including things like C<\w> and C<\D>,
11371137
respect the C<E<sol>a> (and C<E<sol>aa>) modifiers.
11381138

11391139
Note that C<< (?[ ]) >> is a regex-compile-time construct. Any attempt
@@ -1145,7 +1145,7 @@ just three limitations:
11451145

11461146
=item 1
11471147

1148-
When compiled within the scope of C<use locale> (or the C<E<sol>l> regex
1148+
When compiled within the scope of L<C<use locale>|locale> (or the C<E<sol>l> regex
11491149
modifier), this construct assumes that the execution-time locale will be
11501150
a UTF-8 one, and the generated pattern always uses Unicode rules. What
11511151
gets matched or not thus isn't dependent on the actual runtime locale, so
@@ -1163,15 +1163,15 @@ properties).
11631163
=item 3
11641164

11651165
A regular expression that otherwise would compile
1166-
using C<E<sol>d> rules, and which uses this construct will instead
1166+
using C<E<sol>d> rules and which uses this construct will instead
11671167
use C<E<sol>u>. Thus this construct tells Perl that you don't want
11681168
C<E<sol>d> rules for the entire regular expression containing it.
11691169

11701170
=back
11711171

11721172
Note that skipping white space applies only to the interior of this
11731173
construct. There must not be any space between any of the characters
1174-
that form the initial C<(?[>. Nor may there be space between the
1174+
that form the initial C<(?[>, nor may there be space between the
11751175
closing C<])> characters.
11761176

11771177
Just as in all regular expressions, the pattern can be built up by

0 commit comments

Comments
 (0)