Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: RegEx: How to negate more than one character?

by jettero (Monsignor)
on Mar 25, 2007 at 23:34 UTC ( [id://606501]=note: print w/replies, xml ) Need Help??


in reply to Re^2: RegEx: How to negate more than one character?
in thread RegEx: How to negate more than one character?

You can proably use a negatively asserted look ahead: $str =~ m/$pattern(?!ab|cd)$morepattern/;. It is a zero-width pattern, but it might do what you want. It's about half-way through perlre.

-Paul

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (7)
As of 2024-03-28 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found