diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-19 16:50:12 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-19 16:50:12 +0000 |
commit | 0b6d1084e373279d47c652febb0c4cf6a0254861 (patch) | |
tree | 884bf467c7584f396a41e003145966e2510f272d | |
parent | c5738eb60884fa93ed673c232ad5d1d7cc1019e3 (diff) | |
download | perl-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.pod | 17 |
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 |