From 0b6d1084e373279d47c652febb0c4cf6a0254861 Mon Sep 17 00:00:00 2001 From: Jarkko Hietaniemi Date: Wed, 19 Dec 2001 16:50:12 +0000 Subject: [PATCH] Re: [BUG] bleadperl regexp (was ok in 5.6.0) From: Wolfgang Laun 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 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 | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pod/perlre.pod b/pod/perlre.pod index 900a01d..feafb0e 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 -- 2.7.4