RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
\s?\b((?!\b50\b|\b00\b)\w*)\b\s?
Description
This Expression exclude any word/code from a sentence. To find out all the words except any specific codes/words use this. In this example we will exclude 50 and 00 and find all other words in the sentence. Example Text: "Ask me 50 00 times" Matches:Ask,me,times Here it ignores 50 and 00 and matches the other words. Modify according to your needs. I excluded 50 or 00.
Matches
ask me 50 times | ask me 00 times | ask me 50 00 times
Non-Matches
.. | .. | ..
Author Rating: Not yet rated. Shahed Khan
Source
Your Rating
Bad Good

Enter New Comment

Title

Name

Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Look at the modification Mark
Name: Shahed Khan
Date: 11/16/2005 9:24:37 PM
Comment:
Hi Mark you were right with my previous Expresssion. [^\s?50|\s?00]\w* This will find any character 5 0 in any order. Please have a look at the modified one. Thankyou Shahed Khan


Title: Not quite the right description
Name: Mark
Date: 11/16/2005 1:56:23 PM
Comment:
Only problem is it will also match: "Ask me 05 times" "Ask me 000 times"


Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials