Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 examining the Monastery: (3)
As of 2014-09-19 21:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (147 votes), past polls