473,703 Members | 2,375 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

best practise for search function / regExp?

Hey,

ok i have numerous tables to search through for a 'site search'.

some of the searchble fields have html embeded within so after some quick
referencing, saw I can use the regExp function to strip out all the HTML
leaving only the raw text.
(done and works a treat)

My issue is:

what is the best method to remove alot of words such as "a", "and", "I",
"so", "that", "this" ...etc ... from the search string leaving only keywords
essentially per page/field that will be searched within for the occurance
of the users' input text through a input field

The idea being to only return the suitable records without alot of
rubbish...

your assitance is appreciated.

Thankyou
Jul 19 '06 #1
3 2024
"Russell" wrote ...
what is the best method to remove alot of words such as "a", "and", "I",
"so", "that", "this" ...etc ... from the search string leaving only
keywords essentially per page/field that will be searched within for the
occurance of the users' input text through a input field

The idea being to only return the suitable records without alot of
rubbish...
You want to create yourself an IGNORE WORDS list, I put one of these
together before, contains about 390 now I think - you can search Google and
find results for this pretty easily, the pain is sometimes having to get
them from the web into a format you can use, perhaps from a web page to
excel to xml or something...

With these, you then just have a little function that is called passing in
your search criteria, iterate through each word in the search criteria and
the ignore words, if you find a match dont keep it as good criteria, if
there's no match then keep it...

Example:

Dim aIgnoreWords(4)

aIgnoreWords(0) = "a"
aIgnoreWords(1) = "i"
aIgnoreWords(2) = "them"
aIgnoreWords(3) = "must"

bMatchFound = False

sSearchCriteria = "I must find them and a donkey"

aSearchCriteria Words = Split(sSearchCr iteria, " ")

' iterate through search criteria words
For x = 0 To (UBound(aSearch CriteriaWords)-1)

' iterate through our ignore words
For y = 0 To (UBound(aIgnore Words)-1)

' do we have a match?
If LCase(aSearchCr itieriaWords(x) ) = LCase(aIgnoreWo rds(y)) Then

' match found!
bMatchFound = True
Exit For

End If

Next

' if we didn't match our criteria word to any ignore words then its a
good criteria word, add it to our new search criteria
If bMarchFound = False Then

sNewSearchCrite ria = sNewSearchCrite ria & aSearchCriteria (x)

' add a space to separate the words
If x < (UBound(aIgnore Words)-1) Then

sNewSearchCrite ria & " "

End If

Else

' reset flag ready for next search criteria word
bMatchFound = False

End If

Next

By the end of this, your sNewSearchCrite ria string should contain: "find and
my donkey"

Little example only and untested so it might error - you should also
consider doing some checks,

does the Len(sSearchCrit eria) 1 (do we have anything to search for at
all?!)
have you loaded in your ignore words successful (perhaps from a
database/xml)
do you want to store the words that were admitted so you can do what google
used to do... "The following common words were exclude; a, i, them, must"
etc

My list of ignore words is below, its in XML format, but you cold easily do
a REPLACE ALL in word or something to remove the tags..hope its of use.

Regards

Rob
<?xml version="1.0" encoding="utf-8" ?>
<IgnoreWords>
<Word>a</Word>
<Word>about</Word>
<Word>above</Word>
<Word>according </Word>
<Word>across</Word>
<Word>actuall y</Word>
<Word>adj</Word>
<Word>after</Word>
<Word>afterward s</Word>
<Word>again</Word>
<Word>against </Word>
<Word>all</Word>
<Word>almost</Word>
<Word>alone</Word>
<Word>along</Word>
<Word>already </Word>
<Word>also</Word>
<Word>althoug h</Word>
<Word>always</Word>
<Word>among</Word>
<Word>amongst </Word>
<Word>an</Word>
<Word>and</Word>
<Word>another </Word>
<Word>any</Word>
<Word>anyhow</Word>
<Word>anyone</Word>
<Word>anythin g</Word>
<Word>anywher e</Word>
<Word>are</Word>
<Word>aren't</Word>
<Word>around</Word>
<Word>as</Word>
<Word>at</Word>
<Word>b</Word>
<Word>be</Word>
<Word>became</Word>
<Word>because </Word>
<Word>become</Word>
<Word>becomes </Word>
<Word>becomin g</Word>
<Word>been</Word>
<Word>before</Word>
<Word>beforehan d</Word>
<Word>begin</Word>
<Word>beginning </Word>
<Word>behind</Word>
<Word>being</Word>
<Word>below</Word>
<Word>beside</Word>
<Word>besides </Word>
<Word>between </Word>
<Word>beyond</Word>
<Word>billion </Word>
<Word>both</Word>
<Word>but</Word>
<Word>by</Word>
<Word>c</Word>
<Word>can</Word>
<Word>can't</Word>
<Word>cannot</Word>
<Word>caption </Word>
<Word>co</Word>
<Word>co.</Word>
<Word>could</Word>
<Word>couldn' t</Word>
<Word>d</Word>
<Word>did</Word>
<Word>didn't</Word>
<Word>do</Word>
<Word>does</Word>
<Word>doesn't </Word>
<Word>don't</Word>
<Word>down</Word>
<Word>during</Word>
<Word>e</Word>
<Word>each</Word>
<Word>eg</Word>
<Word>eight</Word>
<Word>eighty</Word>
<Word>either</Word>
<Word>else</Word>
<Word>elsewhere </Word>
<Word>end</Word>
<Word>ending</Word>
<Word>enough</Word>
<Word>etc</Word>
<Word>even</Word>
<Word>ever</Word>
<Word>every</Word>
<Word>everyon e</Word>
<Word>everythin g</Word>
<Word>everywher e</Word>
<Word>except</Word>
<Word>f</Word>
<Word>few</Word>
<Word>fifty</Word>
<Word>first</Word>
<Word>five</Word>
<Word>for</Word>
<Word>former</Word>
<Word>formerl y</Word>
<Word>forty</Word>
<Word>found</Word>
<Word>four</Word>
<Word>from</Word>
<Word>further </Word>
<Word>g</Word>
<Word>h</Word>
<Word>had</Word>
<Word>has</Word>
<Word>hasn't</Word>
<Word>have</Word>
<Word>haven't </Word>
<Word>he</Word>
<Word>he'd</Word>
<Word>he'll</Word>
<Word>he's</Word>
<Word>hence</Word>
<Word>her</Word>
<Word>here</Word>
<Word>here's</Word>
<Word>hereafter </Word>
<Word>hereby</Word>
<Word>herein</Word>
<Word>hereupo n</Word>
<Word>hers</Word>
<Word>herself </Word>
<Word>him</Word>
<Word>himself </Word>
<Word>his</Word>
<Word>how</Word>
<Word>however </Word>
<Word>hundred </Word>
<Word>i</Word>
<Word>i'd</Word>
<Word>i'll</Word>
<Word>i'm</Word>
<Word>i've</Word>
<Word>ie</Word>
<Word>if</Word>
<Word>in</Word>
<Word>inc.</Word>
<Word>indeed</Word>
<Word>instead </Word>
<Word>into</Word>
<Word>is</Word>
<Word>isn't</Word>
<Word>it</Word>
<Word>it's</Word>
<Word>its</Word>
<Word>itself</Word>
<Word>j</Word>
<Word>k</Word>
<Word>l</Word>
<Word>last</Word>
<Word>later</Word>
<Word>latter</Word>
<Word>latterl y</Word>
<Word>least</Word>
<Word>less</Word>
<Word>let</Word>
<Word>let's</Word>
<Word>like</Word>
<Word>likely</Word>
<Word>ltd</Word>
<Word>m</Word>
<Word>made</Word>
<Word>make</Word>
<Word>makes</Word>
<Word>many</Word>
<Word>maybe</Word>
<Word>me</Word>
<Word>meantim e</Word>
<Word>meanwhile </Word>
<Word>might</Word>
<Word>million </Word>
<Word>miss</Word>
<Word>more</Word>
<Word>moreove r</Word>
<Word>most</Word>
<Word>mostly</Word>
<Word>mr</Word>
<Word>mrs</Word>
<Word>much</Word>
<Word>must</Word>
<Word>my</Word>
<Word>myself</Word>
<Word>n</Word>
<Word>namely</Word>
<Word>neither </Word>
<Word>never</Word>
<Word>neverthel ess</Word>
<Word>next</Word>
<Word>nine</Word>
<Word>ninety</Word>
<Word>no</Word>
<Word>nobody</Word>
<Word>none</Word>
<Word>nonethele ss</Word>
<Word>noone</Word>
<Word>nor</Word>
<Word>not</Word>
<Word>nothing </Word>
<Word>now</Word>
<Word>nowhere </Word>
<Word>o</Word>
<Word>of</Word>
<Word>off</Word>
<Word>often</Word>
<Word>on</Word>
<Word>once</Word>
<Word>one</Word>
<Word>one's</Word>
<Word>only</Word>
<Word>onto</Word>
<Word>or</Word>
<Word>other</Word>
<Word>others</Word>
<Word>otherwise </Word>
<Word>our</Word>
<Word>ours</Word>
<Word>ourselves </Word>
<Word>out</Word>
<Word>over</Word>
<Word>overall </Word>
<Word>own</Word>
<Word>p</Word>
<Word>per</Word>
<Word>perhaps </Word>
<Word>q</Word>
<Word>r</Word>
<Word>rather</Word>
<Word>recent</Word>
<Word>recentl y</Word>
<Word>s</Word>
<Word>same</Word>
<Word>seem</Word>
<Word>seemed</Word>
<Word>seeming </Word>
<Word>seems</Word>
<Word>seven</Word>
<Word>seventy </Word>
<Word>several </Word>
<Word>she</Word>
<Word>she'd</Word>
<Word>she'll</Word>
<Word>she's</Word>
<Word>should</Word>
<Word>shouldn't </Word>
<Word>since</Word>
<Word>six</Word>
<Word>sixty</Word>
<Word>so</Word>
<Word>some</Word>
<Word>somehow </Word>
<Word>someone </Word>
<Word>something </Word>
<Word>sometim e</Word>
<Word>sometimes </Word>
<Word>somewhere </Word>
<Word>still</Word>
<Word>stop</Word>
<Word>stoplis t</Word>
<Word>such</Word>
<Word>t</Word>
<Word>taking</Word>
<Word>ten</Word>
<Word>than</Word>
<Word>that</Word>
<Word>that'll </Word>
<Word>that's</Word>
<Word>that've </Word>
<Word>the</Word>
<Word>their</Word>
<Word>them</Word>
<Word>themselve s</Word>
<Word>then</Word>
<Word>thence</Word>
<Word>there</Word>
<Word>there'd </Word>
<Word>there'l l</Word>
<Word>there'r e</Word>
<Word>there's </Word>
<Word>there'v e</Word>
<Word>thereafte r</Word>
<Word>thereby </Word>
<Word>therefore </Word>
<Word>therein </Word>
<Word>thereupon </Word>
<Word>these</Word>
<Word>they</Word>
<Word>they'd</Word>
<Word>they'll </Word>
<Word>they're </Word>
<Word>they've </Word>
<Word>thirty</Word>
<Word>this</Word>
<Word>those</Word>
<Word>though</Word>
<Word>thousan d</Word>
<Word>three</Word>
<Word>through </Word>
<Word>throughou t</Word>
<Word>thru</Word>
<Word>thus</Word>
<Word>to</Word>
<Word>togethe r</Word>
<Word>too</Word>
<Word>toward</Word>
<Word>towards </Word>
<Word>trillio n</Word>
<Word>twenty</Word>
<Word>two</Word>
<Word>u</Word>
<Word>under</Word>
<Word>unless</Word>
<Word>unlike</Word>
<Word>unlikel y</Word>
<Word>until</Word>
<Word>up</Word>
<Word>upon</Word>
<Word>us</Word>
<Word>used</Word>
<Word>using</Word>
<Word>v</Word>
<Word>very</Word>
<Word>via</Word>
<Word>w</Word>
<Word>was</Word>
<Word>wasn't</Word>
<Word>we</Word>
<Word>we'd</Word>
<Word>we'll</Word>
<Word>we're</Word>
<Word>we've</Word>
<Word>well</Word>
<Word>were</Word>
<Word>weren't </Word>
<Word>what</Word>
<Word>what'll </Word>
<Word>what's</Word>
<Word>what've </Word>
<Word>whateve r</Word>
<Word>when</Word>
<Word>whence</Word>
<Word>wheneve r</Word>
<Word>where</Word>
<Word>where's </Word>
<Word>whereafte r</Word>
<Word>whereas </Word>
<Word>whereby </Word>
<Word>wherein </Word>
<Word>whereupon </Word>
<Word>whereve r</Word>
<Word>whether </Word>
<Word>which</Word>
<Word>while</Word>
<Word>whither </Word>
<Word>who</Word>
<Word>who'd</Word>
<Word>who'll</Word>
<Word>who's</Word>
<Word>whoever </Word>
<Word>whole</Word>
<Word>whom</Word>
<Word>whomeve r</Word>
<Word>whose</Word>
<Word>why</Word>
<Word>will</Word>
<Word>with</Word>
<Word>within</Word>
<Word>without </Word>
<Word>won't</Word>
<Word>would</Word>
<Word>wouldn' t</Word>
<Word>x</Word>
<Word>y</Word>
<Word>yes</Word>
<Word>yet</Word>
<Word>you</Word>
<Word>you'd</Word>
<Word>you'll</Word>
<Word>you're</Word>
<Word>you've</Word>
<Word>your</Word>
<Word>yours</Word>
<Word>yoursel f</Word>
<Word>yourselve s</Word>
<Word>z</Word>
</IgnoreWords>
Jul 20 '06 #2
Much appreciated for the advice AND your list!!
Thanks!!

"Rob Meade" wrote in message
"Russell" wrote ...
>what is the best method to remove alot of words such as "a", "and", "I",
"so", "that", "this" ...etc ... from the search string leaving only
keywords essentially per page/field that will be searched within for the
occurance of the users' input text through a input field

The idea being to only return the suitable records without alot of
rubbish...

You want to create yourself an IGNORE WORDS list, I put one of these
together before, contains about 390 now I think - you can search Google
and find results for this pretty easily, the pain is sometimes having to
get them from the web into a format you can use, perhaps from a web page
to excel to xml or something...

With these, you then just have a little function that is called passing in
your search criteria, iterate through each word in the search criteria and
the ignore words, if you find a match dont keep it as good criteria, if
there's no match then keep it...

Example:

Dim aIgnoreWords(4)

aIgnoreWords(0) = "a"
aIgnoreWords(1) = "i"
aIgnoreWords(2) = "them"
aIgnoreWords(3) = "must"

bMatchFound = False

sSearchCriteria = "I must find them and a donkey"

aSearchCriteria Words = Split(sSearchCr iteria, " ")

' iterate through search criteria words
For x = 0 To (UBound(aSearch CriteriaWords)-1)

' iterate through our ignore words
For y = 0 To (UBound(aIgnore Words)-1)

' do we have a match?
If LCase(aSearchCr itieriaWords(x) ) = LCase(aIgnoreWo rds(y)) Then

' match found!
bMatchFound = True
Exit For

End If

Next

' if we didn't match our criteria word to any ignore words then its a
good criteria word, add it to our new search criteria
If bMarchFound = False Then

sNewSearchCrite ria = sNewSearchCrite ria & aSearchCriteria (x)

' add a space to separate the words
If x < (UBound(aIgnore Words)-1) Then

sNewSearchCrite ria & " "

End If

Else

' reset flag ready for next search criteria word
bMatchFound = False

End If

Next

By the end of this, your sNewSearchCrite ria string should contain: "find
and my donkey"

Little example only and untested so it might error - you should also
consider doing some checks,

does the Len(sSearchCrit eria) 1 (do we have anything to search for at
all?!)
have you loaded in your ignore words successful (perhaps from a
database/xml)
do you want to store the words that were admitted so you can do what
google used to do... "The following common words were exclude; a, i, them,
must" etc

My list of ignore words is below, its in XML format, but you cold easily
do a REPLACE ALL in word or something to remove the tags..hope its of use.

Regards

Rob
<?xml version="1.0" encoding="utf-8" ?>
<IgnoreWords>
<Word>a</Word>
<Word>about</Word>
<Word>above</Word>
<Word>according </Word>
<Word>across</Word>
<Word>actuall y</Word>
<Word>adj</Word>
<Word>after</Word>
<Word>afterward s</Word>
<Word>again</Word>
<Word>against </Word>
<Word>all</Word>
<Word>almost</Word>
<Word>alone</Word>
<Word>along</Word>
<Word>already </Word>
<Word>also</Word>
<Word>althoug h</Word>
<Word>always</Word>
<Word>among</Word>
<Word>amongst </Word>
<Word>an</Word>
<Word>and</Word>
<Word>another </Word>
<Word>any</Word>
<Word>anyhow</Word>
<Word>anyone</Word>
<Word>anythin g</Word>
<Word>anywher e</Word>
<Word>are</Word>
<Word>aren't</Word>
<Word>around</Word>
<Word>as</Word>
<Word>at</Word>
<Word>b</Word>
<Word>be</Word>
<Word>became</Word>
<Word>because </Word>
<Word>become</Word>
<Word>becomes </Word>
<Word>becomin g</Word>
<Word>been</Word>
<Word>before</Word>
<Word>beforehan d</Word>
<Word>begin</Word>
<Word>beginning </Word>
<Word>behind</Word>
<Word>being</Word>
<Word>below</Word>
<Word>beside</Word>
<Word>besides </Word>
<Word>between </Word>
<Word>beyond</Word>
<Word>billion </Word>
<Word>both</Word>
<Word>but</Word>
<Word>by</Word>
<Word>c</Word>
<Word>can</Word>
<Word>can't</Word>
<Word>cannot</Word>
<Word>caption </Word>
<Word>co</Word>
<Word>co.</Word>
<Word>could</Word>
<Word>couldn' t</Word>
<Word>d</Word>
<Word>did</Word>
<Word>didn't</Word>
<Word>do</Word>
<Word>does</Word>
<Word>doesn't </Word>
<Word>don't</Word>
<Word>down</Word>
<Word>during</Word>
<Word>e</Word>
<Word>each</Word>
<Word>eg</Word>
<Word>eight</Word>
<Word>eighty</Word>
<Word>either</Word>
<Word>else</Word>
<Word>elsewhere </Word>
<Word>end</Word>
<Word>ending</Word>
<Word>enough</Word>
<Word>etc</Word>
<Word>even</Word>
<Word>ever</Word>
<Word>every</Word>
<Word>everyon e</Word>
<Word>everythin g</Word>
<Word>everywher e</Word>
<Word>except</Word>
<Word>f</Word>
<Word>few</Word>
<Word>fifty</Word>
<Word>first</Word>
<Word>five</Word>
<Word>for</Word>
<Word>former</Word>
<Word>formerl y</Word>
<Word>forty</Word>
<Word>found</Word>
<Word>four</Word>
<Word>from</Word>
<Word>further </Word>
<Word>g</Word>
<Word>h</Word>
<Word>had</Word>
<Word>has</Word>
<Word>hasn't</Word>
<Word>have</Word>
<Word>haven't </Word>
<Word>he</Word>
<Word>he'd</Word>
<Word>he'll</Word>
<Word>he's</Word>
<Word>hence</Word>
<Word>her</Word>
<Word>here</Word>
<Word>here's</Word>
<Word>hereafter </Word>
<Word>hereby</Word>
<Word>herein</Word>
<Word>hereupo n</Word>
<Word>hers</Word>
<Word>herself </Word>
<Word>him</Word>
<Word>himself </Word>
<Word>his</Word>
<Word>how</Word>
<Word>however </Word>
<Word>hundred </Word>
<Word>i</Word>
<Word>i'd</Word>
<Word>i'll</Word>
<Word>i'm</Word>
<Word>i've</Word>
<Word>ie</Word>
<Word>if</Word>
<Word>in</Word>
<Word>inc.</Word>
<Word>indeed</Word>
<Word>instead </Word>
<Word>into</Word>
<Word>is</Word>
<Word>isn't</Word>
<Word>it</Word>
<Word>it's</Word>
<Word>its</Word>
<Word>itself</Word>
<Word>j</Word>
<Word>k</Word>
<Word>l</Word>
<Word>last</Word>
<Word>later</Word>
<Word>latter</Word>
<Word>latterl y</Word>
<Word>least</Word>
<Word>less</Word>
<Word>let</Word>
<Word>let's</Word>
<Word>like</Word>
<Word>likely</Word>
<Word>ltd</Word>
<Word>m</Word>
<Word>made</Word>
<Word>make</Word>
<Word>makes</Word>
<Word>many</Word>
<Word>maybe</Word>
<Word>me</Word>
<Word>meantim e</Word>
<Word>meanwhile </Word>
<Word>might</Word>
<Word>million </Word>
<Word>miss</Word>
<Word>more</Word>
<Word>moreove r</Word>
<Word>most</Word>
<Word>mostly</Word>
<Word>mr</Word>
<Word>mrs</Word>
<Word>much</Word>
<Word>must</Word>
<Word>my</Word>
<Word>myself</Word>
<Word>n</Word>
<Word>namely</Word>
<Word>neither </Word>
<Word>never</Word>
<Word>neverthel ess</Word>
<Word>next</Word>
<Word>nine</Word>
<Word>ninety</Word>
<Word>no</Word>
<Word>nobody</Word>
<Word>none</Word>
<Word>nonethele ss</Word>
<Word>noone</Word>
<Word>nor</Word>
<Word>not</Word>
<Word>nothing </Word>
<Word>now</Word>
<Word>nowhere </Word>
<Word>o</Word>
<Word>of</Word>
<Word>off</Word>
<Word>often</Word>
<Word>on</Word>
<Word>once</Word>
<Word>one</Word>
<Word>one's</Word>
<Word>only</Word>
<Word>onto</Word>
<Word>or</Word>
<Word>other</Word>
<Word>others</Word>
<Word>otherwise </Word>
<Word>our</Word>
<Word>ours</Word>
<Word>ourselves </Word>
<Word>out</Word>
<Word>over</Word>
<Word>overall </Word>
<Word>own</Word>
<Word>p</Word>
<Word>per</Word>
<Word>perhaps </Word>
<Word>q</Word>
<Word>r</Word>
<Word>rather</Word>
<Word>recent</Word>
<Word>recentl y</Word>
<Word>s</Word>
<Word>same</Word>
<Word>seem</Word>
<Word>seemed</Word>
<Word>seeming </Word>
<Word>seems</Word>
<Word>seven</Word>
<Word>seventy </Word>
<Word>several </Word>
<Word>she</Word>
<Word>she'd</Word>
<Word>she'll</Word>
<Word>she's</Word>
<Word>should</Word>
<Word>shouldn't </Word>
<Word>since</Word>
<Word>six</Word>
<Word>sixty</Word>
<Word>so</Word>
<Word>some</Word>
<Word>somehow </Word>
<Word>someone </Word>
<Word>something </Word>
<Word>sometim e</Word>
<Word>sometimes </Word>
<Word>somewhere </Word>
<Word>still</Word>
<Word>stop</Word>
<Word>stoplis t</Word>
<Word>such</Word>
<Word>t</Word>
<Word>taking</Word>
<Word>ten</Word>
<Word>than</Word>
<Word>that</Word>
<Word>that'll </Word>
<Word>that's</Word>
<Word>that've </Word>
<Word>the</Word>
<Word>their</Word>
<Word>them</Word>
<Word>themselve s</Word>
<Word>then</Word>
<Word>thence</Word>
<Word>there</Word>
<Word>there'd </Word>
<Word>there'l l</Word>
<Word>there'r e</Word>
<Word>there's </Word>
<Word>there'v e</Word>
<Word>thereafte r</Word>
<Word>thereby </Word>
<Word>therefore </Word>
<Word>therein </Word>
<Word>thereupon </Word>
<Word>these</Word>
<Word>they</Word>
<Word>they'd</Word>
<Word>they'll </Word>
<Word>they're </Word>
<Word>they've </Word>
<Word>thirty</Word>
<Word>this</Word>
<Word>those</Word>
<Word>though</Word>
<Word>thousan d</Word>
<Word>three</Word>
<Word>through </Word>
<Word>throughou t</Word>
<Word>thru</Word>
<Word>thus</Word>
<Word>to</Word>
<Word>togethe r</Word>
<Word>too</Word>
<Word>toward</Word>
<Word>towards </Word>
<Word>trillio n</Word>
<Word>twenty</Word>
<Word>two</Word>
<Word>u</Word>
<Word>under</Word>
<Word>unless</Word>
<Word>unlike</Word>
<Word>unlikel y</Word>
<Word>until</Word>
<Word>up</Word>
<Word>upon</Word>
<Word>us</Word>
<Word>used</Word>
<Word>using</Word>
<Word>v</Word>
<Word>very</Word>
<Word>via</Word>
<Word>w</Word>
<Word>was</Word>
<Word>wasn't</Word>
<Word>we</Word>
<Word>we'd</Word>
<Word>we'll</Word>
<Word>we're</Word>
<Word>we've</Word>
<Word>well</Word>
<Word>were</Word>
<Word>weren't </Word>
<Word>what</Word>
<Word>what'll </Word>
<Word>what's</Word>
<Word>what've </Word>
<Word>whateve r</Word>
<Word>when</Word>
<Word>whence</Word>
<Word>wheneve r</Word>
<Word>where</Word>
<Word>where's </Word>
<Word>whereafte r</Word>
<Word>whereas </Word>
<Word>whereby </Word>
<Word>wherein </Word>
<Word>whereupon </Word>
<Word>whereve r</Word>
<Word>whether </Word>
<Word>which</Word>
<Word>while</Word>
<Word>whither </Word>
<Word>who</Word>
<Word>who'd</Word>
<Word>who'll</Word>
<Word>who's</Word>
<Word>whoever </Word>
<Word>whole</Word>
<Word>whom</Word>
<Word>whomeve r</Word>
<Word>whose</Word>
<Word>why</Word>
<Word>will</Word>
<Word>with</Word>
<Word>within</Word>
<Word>without </Word>
<Word>won't</Word>
<Word>would</Word>
<Word>wouldn' t</Word>
<Word>x</Word>
<Word>y</Word>
<Word>yes</Word>
<Word>yet</Word>
<Word>you</Word>
<Word>you'd</Word>
<Word>you'll</Word>
<Word>you're</Word>
<Word>you've</Word>
<Word>your</Word>
<Word>yours</Word>
<Word>yoursel f</Word>
<Word>yourselve s</Word>
<Word>z</Word>
</IgnoreWords>

Jul 20 '06 #3
"Russell" wrote ...
Much appreciated for the advice AND your list!!
Thanks!!
You're welcome Russell, if I'd had more time I'd have done a quick test on
the code too - but I suspect you'll get the idea from it and be able to
write your own and better! :o)

Rob
Jul 20 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
39351
by: Anand Pillai | last post by:
To search a word in a group of words, say a paragraph or a web page, would a string search or a regexp search be faster? The string search would of course be, if str.find(substr) != -1: domything() And the regexp search assuming no case restriction would be,
4
1878
by: Paul Rubin | last post by:
I have a string s, possibly megabytes in size, and two regexps, p and q. I want to find the first occurence of q that occurs after the first occurence of p. Is there a reasonable way to do it? g1 = re.search(p, s) g2 = re.search(q, s) q_offset = g1.end() + g2.start()
1
8724
by: Les Juby | last post by:
A year or two back I needed a search script to scan thru HTML files on a client site. Usual sorta thing. A quick search turned up a neat script that provided great search results. It was fast, returned the hyperlinked page title, filename, and the body txt (30 preceding and following words) in context with the search word highlighted. Excellent.! See it working at: http://www.ipt.co.za Just search for "firearm"
13
4531
by: David Morgan | last post by:
Hello I have a little function to highlight text if it exists. Function Highlight(vFind, vSearch) Dim RegEx Set RegEx = New RegExp RegEx.Pattern = vFind RegEx.IgnoreCase = True Highlight = RegEx.Replace(vSearch, "<span class=""Highlight"">" & vFind &
4
10195
by: Jane Doe | last post by:
Hi, I need to search and replace patterns in web pages, but I can't find a way even after reading the ad hoc chapter in New Rider's "Inside JavaScript". Here's what I want to do: function filter() { var items = new Array("John", "Jane");
5
5038
by: vonclausowitz | last post by:
Repost from an VB group. Hi All, I'm looking for a way to search for multiple words in a database. There is however one but. The words have to be within a certain range of each other. For example I would like to find records which contain the word MALE and within for example 10 words of it the word BROWN.
8
1662
by: Ben Amada | last post by:
Hi all. I know very little about regular expressions, but wanted to use one to validate an email address a user would be entering before the form is submitted. There are many examples out there. Two two functions I found below both validate an email address correctly, but work differently. The first one uses the "search" method of a string, and the second uses a RegExp object. I'm just wondering which method might be most reliable...
47
3437
by: Henning_Thornblad | last post by:
What can be the cause of the large difference between re.search and grep? This script takes about 5 min to run on my computer: #!/usr/bin/env python import re row="" for a in range(156000): row+="a"
10
1503
by: Fred | last post by:
I'm researching and I see various approaches, with or without regex. So I'm asking for opinions on which is the best - that is, the most thorough. Thanks.
0
8755
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9116
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8961
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7860
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6585
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4428
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4685
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3120
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2445
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.