Serge314 has asked for the wisdom of the Perl Monks concerning the following question:
I use ActiveState Perl 5.12.2. I'm surprized:
'a' =~ /^(?(?=b)b)a$/ # Not match 'a' =~ /^(?(?=b))a$/ # Match
Why yes-subpattern attempts to match? The condition (?=b) must return false.
Regards,
Serge
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: A bug in regex with conditional subpattern?
by moritz (Cardinal) on Mar 17, 2011 at 11:18 UTC | |
|
Re: A bug in regex with conditional subpattern?
by BrowserUk (Patriarch) on Mar 17, 2011 at 10:21 UTC | |
by moritz (Cardinal) on Mar 17, 2011 at 10:43 UTC | |
by ig (Vicar) on Mar 17, 2011 at 18:00 UTC | |
by moritz (Cardinal) on Mar 19, 2011 at 19:16 UTC | |
by jethro (Monsignor) on Mar 17, 2011 at 10:38 UTC |