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

Re: Bug on perlre doc?

Thread Previous
From:
Alberto Simões
Date:
November 3, 2011 10:18
Subject:
Re: Bug on perlre doc?
Message ID:
4EB2CCE5.6090001@alfarrabio.di.uminho.pt


On 03/11/2011 16:51, Abigail wrote:
> 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.

And if there weren't some extra ? :)

Thanks, Abigail.

-- 
Alberto Simoes
CEHUM

Thread Previous


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