From: Brad Baxter Date: Thu, 31 May 2007 15:04:55 +0000 (-0700) Subject: [perl #43094] Doc patch to perlre: modifiers => quantifiers X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=527e91da3efcef88ca1e3a004b2ada277cd1d50c;p=p5sagit%2Fp5-mst-13.2.git [perl #43094] Doc patch to perlre: modifiers => quantifiers From: Brad Baxter (via RT) Message-ID: p4raw-id: //depot/perl@31325 --- diff --git a/pod/perlre.pod b/pod/perlre.pod index a12349b..7571729 100644 --- a/pod/perlre.pod +++ b/pod/perlre.pod @@ -145,8 +145,8 @@ X X X<*> X<+> X X<{n}> X<{n,}> X<{n,m}> (If a curly bracket occurs in any other context, it is treated as a regular character. In particular, the lower bound -is not optional.) The "*" modifier is equivalent to C<{0,}>, the "+" -modifier to C<{1,}>, and the "?" modifier to C<{0,1}>. n and m are limited +is not optional.) The "*" quantifier is equivalent to C<{0,}>, the "+" +quantifier to C<{1,}>, and the "?" quantifier to C<{0,1}>. n and m are limited to integral values less than a preset limit defined when perl is built. This is usually 32766 on the most common platforms. The actual limit can be seen in the error message generated by code such as this: @@ -1891,7 +1891,7 @@ loops using regular expressions, with something as innocuous as: The C matches at the beginning of C<'foo'>, and since the position in the string is not moved by the match, C would match again and again -because of the C<*> modifier. Another common way to create a similar cycle +because of the C<*> quantifier. Another common way to create a similar cycle is with the looping modifier C: @matches = ( 'foo' =~ m{ o? }xg ); @@ -1911,7 +1911,7 @@ may match zero-length substrings. Here's a simple example being: Thus Perl allows such constructs, by I. The rules for this are different for lower-level -loops given by the greedy modifiers C<*+{}>, and for higher-level +loops given by the greedy quantifiers C<*+{}>, and for higher-level ones like the C modifier or split() operator. The lower-level loops are I (that is, the loop is