develooper Front page | perl.perl5.porters | Postings from November 2011

Re: Bug on perlre doc?

Thread Previous | Thread Next
From:
Abigail
Date:
November 3, 2011 09:52
Subject:
Re: Bug on perlre doc?
Message ID:
20111103165157.GB27769@almanda
On Thu, Nov 03, 2011 at 04:21:12PM +0000, Alberto Simões wrote:
> Hello
>
> Perlre includes:
>
>        "(?(condition)yes-pattern|no-pattern)"
>        "(?(condition)yes-pattern)"
>
> But I think the ? is after the (), as in the example below?
>
>                      m{ ( \( )?
>                         [^()]+
>                         (?(1) \) )
>                       }x
>


No, it's correct. I guess the example can be improved but it's 
all about the third line:

    (?(1) \) )

Which has the same syntax as the spec.

It would have been much better if the example wasn't about matching
parenthesis.



Abigail

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