Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

Look-Arounds in Regexes are Hard

by moritz (Cardinal)
on Jul 24, 2009 at 07:31 UTC ( [id://782858]=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    m/^(?! $a ) .*?  $end/sx
    
  2. or download this
    m/^(?! .*? $a ) .*? $end/sx
    
  3. or download this
    $_ = '...</code> ... foo';
    
    ...
        print "Match\n";
    }
    # no match
    
  4. or download this
    m/^ (?: . (?! $a ) )* $end /sx
    
  5. or download this
    $_ = 'foo...</code> ... ';
    
    ...
        print "Match\n";
    }
    # match
    
  6. or download this
    m/^ (?: (?! $a ) . )* $end /sx
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlmeditation [id://782858]
Approved by GrandFather
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found