Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

qr/STRING/ fails with certain lookbehind expressions

by wiewa (Initiate)
on Jul 19, 2013 at 10:14 UTC ( #1045325=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download

  1. or download this
    Variable length lookbehind not implemented in regex...
  2. or download this
    my $pattern = "(?<!ss)abc";      # 'ss' in lookbehind
    qr/$pattern/i;              # throws the error
    my $pattern =  "(?<!s[st])abc";    # 's[st]' in lookbehind
    qr/$pattern/i;                  # this works, whereas these fail: (?<!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1045325]
Approved by hdb
Front-paged by Corion
[1nickt]: jdporter Maybe try IPC::Run3
[LanX]: Sandy Koufax is indeed rude. .. oO
[chacham]: Re: Re: pattern matching -- feeling stoopit a poll idea about centrists, is +8 -5, used to be +6/-6 how apropos :)is +8
[chacham]: ...errr... Re: poll ideas quest 2015 (political centrist)
[chacham]: ooh, late, nighty nite everybody

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (14)
As of 2017-05-24 21:00 GMT
Find Nodes?
    Voting Booth?