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

RE: regexp in 5.005_61: (?{...})

Thread Previous | Thread Next
From:
Konovalov, Vadim
Date:
October 2, 1999 04:30
Subject:
RE: regexp in 5.005_61: (?{...})
Message ID:
402099F49BEED211999700805FC7359F20DB0A@ru0028exch01.spb.lucent.com
> "Konovalov, Vadim" <vkonovalov@lucent.com> wrote
> > While ramblering in Perl's regexp source I've noticed that (?{...})
> > construction is parsed in regcomp.c in too simplified way.
> 
> > perl -e '/(?{print "Hello{"})/'
> > explains:
> > Sequence (?{...}) not terminated or not {}-balanced at -e line 1, within
> pattern
> > /(?{print "Hello{"})/: Sequence (?{...}) not terminated or not
> {}-balanced at -e line 1.
> 
> But you can circumvent it with an escape:
> 
>          perl -e '/(?{print "Hello\{"})/'
>          Hello{
> 
Yes, I did not noticed that before.
Thank you :)

Good luck,
Vadim.

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