Re: [BUG] bleadperl regexp (was ok in 5.6.0)
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 19 Dec 2001 16:50:12 +0000 (16:50 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 19 Dec 2001 16:50:12 +0000 (16:50 +0000)
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

pod/perlre.pod

index 900a01d..feafb0e 100644 (file)
@@ -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