This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make pod2man a little laxer for perltoc.pod
[perl5.git] / pod / perlre.pod
index ce054ec..cb3ce03 100644 (file)
@@ -19,6 +19,9 @@ the regular expression inside.  These are:
 
 Do case-insensitive pattern matching.
 
+If C<use locale> is in effect, the case map is taken from the current
+locale.  See L<perllocale>.
+
 =item m   
 
 Treat string as multiple lines.  That is, change "^" and "$" from matching
@@ -136,6 +139,9 @@ also work:
     \E         end case modification (think vi)
     \Q         quote regexp metacharacters till \E
 
+If C<use locale> is in effect, the case map used by C<\l>, C<\L>, C<\u>
+and <\U> is taken from the current locale.  See L<perllocale>.
+
 In addition, Perl defines the following:
 
     \w Match a "word" character (alphanumeric plus "_")
@@ -146,9 +152,11 @@ In addition, Perl defines the following:
     \D Match a non-digit character
 
 Note that C<\w> matches a single alphanumeric character, not a whole
-word.  To match a word you'd need to say C<\w+>.  You may use C<\w>,
-C<\W>, C<\s>, C<\S>, C<\d>, and C<\D> within character classes (though not
-as either end of a range).
+word.  To match a word you'd need to say C<\w+>.  If C<use locale> is in
+effect, the list of alphabetic characters generated by C<\w> is taken
+from the current locale.  See L<perllocale>. You may use C<\w>, C<\W>,
+C<\s>, C<\S>, C<\d>, and C<\D> within character classes (though not as
+either end of a range).
 
 Perl defines the following zero-width assertions:
 
@@ -166,7 +174,14 @@ represents backspace rather than a word boundary.)  The C<\A> and C<\Z> are
 just like "^" and "$" except that they won't match multiple times when the
 C</m> modifier is used, while "^" and "$" will match at every internal line
 boundary.  To match the actual end of the string, not ignoring newline,
-you can use C<\Z(?!\n)>.
+you can use C<\Z(?!\n)>.  The C<\G> assertion can be used to mix global
+matches (using C<m//g>) and non-global ones, as described in 
+L<perlop/"Regexp Quote-Like Operators">.
+It is also useful when writing C<lex>-like scanners, when you have several
+regexps which you want to match against consequent substrings of your
+string, see the previous reference.
+The actual location where C<\G> will match can also be influenced
+by using C<pos()> as an lvalue.  See L<perlfunc/pos>.
 
 When the bracketing construct C<( ... )> is used, \E<lt>digitE<gt> matches the
 digit'th substring.  Outside of the pattern, always use "$" instead of "\"