Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How can I use backrefs in a lookbehind?

by Roy Johnson (Monsignor)
on Dec 02, 2004 at 16:00 UTC ( [id://411821]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    /..     # match first two chars
    (?:(.)  # capture next char, then
    ...
             (?!\1\1\1) # don't allow a run of three
             ...) # starting three chars back
    ){1,4}/x
    
  2. or download this
    /(?<=  # looking behind,
       (?=.{0,3}foo)  # look for a foo preceded by up to three chars
       .{6}) # starting six chars back
     bar/x # then match bar
    
  3. or download this
    /..     # match first two chars
    (?:
    ...
         ..) # starting only two chars back
     .       # then match the next char
    ){1,4}/x
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://411821]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (4)
As of 2024-04-19 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found