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

Re^3: reg ex NOT

by ikegami (Pope)
on Jun 16, 2006 at 01:33 UTC ( #555670=note: print w/ replies, xml ) Need Help??


in reply to Re^2: reg ex NOT
in thread reg ex NOT

Aye, the construct I posted needs to be anchored (but not necessarily using ^ and $). It may be a waste to use that construct for single characters, but it's useful (necessary) for the use I described in my original post (i.e. To matche a sequence of characters that does not contain anything that matches a specified regexp). For example,

/<table>(?:(?!<\/table>).)*<\/table>/

(Not the best example, cause tables can be nested in HTML and for other reasons, but you get the idea.)


Comment on Re^3: reg ex NOT
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (5)
As of 2015-07-04 15:21 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 (60 votes), past polls