summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-19 16:50:12 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-19 16:50:12 +0000
commit0b6d1084e373279d47c652febb0c4cf6a0254861 (patch)
tree884bf467c7584f396a41e003145966e2510f272d
parentc5738eb60884fa93ed673c232ad5d1d7cc1019e3 (diff)
downloadperl-0b6d1084e373279d47c652febb0c4cf6a0254861.tar.gz
Re: [BUG] bleadperl regexp (was ok in 5.6.0)
From: Wolfgang Laun <Wolfgang.Laun@alcatel.at> Date: Wed, 19 Dec 2001 12:35:07 +0100 Message-ID: <3C207B6B.A687A8EC@alcatel.at> Subject: Re: [BUG] bleadperl regexp (was ok in 5.6.0) From: Hugo van der Sanden <hv@crypt.compulink.co.uk> Date: Wed, 19 Dec 2001 17:34:51 +0000 Message-Id: <200112191734.fBJHYpd30715@crypt.compulink.co.uk> p4raw-id: //depot/perl@13810
-rw-r--r--pod/perlre.pod17
1 files changed, 9 insertions, 8 deletions
diff --git a/pod/perlre.pod b/pod/perlre.pod
index 900a01d740..feafb0e654 100644
--- a/pod/perlre.pod
+++ b/pod/perlre.pod
@@ -458,12 +458,14 @@ C<)> in the comment.
=item C<(?imsx-imsx)>
-One or more embedded pattern-match modifiers. This is particularly
-useful for dynamic patterns, such as those read in from a configuration
-file, read in as an argument, are specified in a table somewhere,
-etc. Consider the case that some of which want to be case sensitive
-and some do not. The case insensitive ones need to include merely
-C<(?i)> at the front of the pattern. For example:
+One or more embedded pattern-match modifiers, to be turned on (or
+turned off, if preceded by C<->) for the remainder of the pattern or
+the remainder of the enclosing pattern group (if any). This is
+particularly useful for dynamic patterns, such as those read in from a
+configuration file, read in as an argument, are specified in a table
+somewhere, etc. Consider the case that some of which want to be case
+sensitive and some do not. The case insensitive ones need to include
+merely C<(?i)> at the front of the pattern. For example:
$pattern = "foobar";
if ( /$pattern/i ) { }
@@ -473,8 +475,7 @@ C<(?i)> at the front of the pattern. For example:
$pattern = "(?i)foobar";
if ( /$pattern/ ) { }
-Letters after a C<-> turn those modifiers off. These modifiers are
-localized inside an enclosing group (if any). For example,
+These modifiers are restored at the end of the enclosing group. For example,
( (?i) blah ) \s+ \1