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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Common English Stopwords for Search Engine
Expression
[\s]a[\s]|[\s]about[\s]|[\s]an[\s]|[\s]are[\s]|[\s]as[\s]|[\s]at[\s]|[\s]be[\s]|[\s]by[\s]|[\s]for[\s]|[\s]from[\s]|[\s]how[\s]|[\s]in[\s]|[\s]is[\s]|[\s]it[\s]|[\s]of[\s]|[\s]on[\s]|[\s]or[\s]|[\s]that[\s]|[\s]the[\s]|[\s]this[\s]|[\s]to[\s]|[\s]was[\s]|[\s]what[\s]|[\s]when[\s]|[\s]where[\s]|[\s]who[\s]|[\s]will[\s]|[\s]with[\s]|[\s]the[\s]|[\s]www[\s]
Description
use this to produce search strings in your programs that run more efficiently. use the replace of the regex class to remove the characters from the user input then use the resulting string to query the database...
Matches
matched words listed between the whitespace character class
Non-Matches
the words not included in the white space character class
Author Rating: The rating for this expression. Chris Morton
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: Good but...
Name: Steve Caligula
Date: 12/13/2006 1:46:37 PM
Comment:
What happens when someone types something like this? Your regex will pick up "this" because there is no whitespace after. Should check for non alpha-num's after too.


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