develooper Front page | perl.perl5.porters | Postings from October 2003

Re: /(\w|(?{++$n}))*/

Thread Previous | Thread Next
From:
Mark Jason Dominus
Date:
October 29, 2003 14:52
Subject:
Re: /(\w|(?{++$n}))*/
Message ID:
20031029225223.25911.qmail@plover.com

> I'm a little confused about the section of perlre which reads:
> 
>   The lower-level loops are interrupted (that is, the loop is broken)
>   when Perl detects that a repeated expression matched a zero-length sub-
>   string.   Thus
> 
>     m{ (?: NON_ZERO_LENGTH | ZERO_LENGTH )* }x;
> 
>   is made equivalent to
> 
>     m{   (?: NON_ZERO_LENGTH )*
>        |
>          (?: ZERO_LENGTH )?
>      }x;
> 
> Is that "|" supposed to be there?  

I think you're right, and that the bar isn't supposed to be there.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About