How to search for all occurrences that do not contain "xxxx"

Tips on writing regular expressions for searching the post list

Moderators: Quade, dexter

How to search for all occurrences that do not contain "xxxx"

Postby PNPman » Mon Sep 10, 2001 11:59 pm

To find all subjects containing (regardless of case) RedHat or Red Hat or Red_hat i would use:

redhat|red[ _]hat



Using the "Find in Subject" i would like to find all posts that do not contain redhat|red[ _]hat

Anyone know how?
User avatar
PNPman
Active Participant
Active Participant
 
Posts: 88
Joined: Fri May 18, 2001 9:29 pm

Registered Newsbin User since: 04/09/03

RE: How to search for all occurrences that do not contain "x

Postby dexter » Tue Sep 11, 2001 8:13 pm

RegEx itself does not have a "Negate" for an entire expression although you can do it for a set. For example [^0-9]+ will return strings that have no numbers in them.

We can, programatically, negate an entire expression but we would have to add a checkbox or something that says "Negate Expression". We will consider this.
User avatar
dexter
Site Admin
Site Admin
 
Posts: 9511
Joined: Fri May 18, 2001 3:50 pm
Location: Northern Virginia, US

Registered Newsbin User since: 10/24/97

RE: How to search for all occurrences that do not contain "x

Postby PNPman » Wed Sep 12, 2001 4:23 am

Thanks for the quick reply, as usual!

Just so that you can understand why i would like this function its because i would like to read other posts besides ones that contain "xxxxx" but be able to delete without concern about accidently deleting posts i want.
PNPman
 


Return to Regular Expressions

Who is online

Users browsing this forum: No registered users and 2 guests