Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Quick regex question

by wind (Priest)
on Mar 31, 2011 at 19:29 UTC ( [id://896710]=note: print w/replies, xml ) Need Help??


in reply to Quick regex question

Sounds like you want the following
/(?:sudden|unexpected)? death(?! benefits)|deceased|passedaway|died|dy +ing/
If you want to force the file to not have death benefits at all, then you could use the following:
/^(?!.*death benefits).*(?:(?:sudden|unexpected)? death(?! benefits)|d +eceased|passedaway|died|dying)/
But probably be cleaner to just separate the regex's
!/death benefits/ && /(?:sudden|unexpected)? death(?! benefits)|deceas +ed|passedaway|died|dying/

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-29 11:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found