Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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: (?<!
    +s[s]),(?<!s[t])
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1045325]
Approved by hdb
Front-paged by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (10)
As of 2015-07-07 12:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls