Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Comparing Lists and removing words?

Status
Not open for further replies.

kloner

Programmer
May 15, 2000
79
0
0
AU
Hi all.

I am doing a search using CF and Spectra. What I need to do is filter out 'mute'
words from the users string before the search is executed.

For example below is my LIST of mute words read from a DB.
tempMutewordList: a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,at,on,from,the,and,is


The user then keys in the string : "cold fusion is cool and i love it". I then convert that to a temp LIST.
tempSearchTerms: cold,fusion,is,cool,and,i,love it

Question is how do I remove the 'mute' words out of the tempSearchTerms list and then search on it.
For example ideally the string should be : "cold fusion cool love"

So I can then continue on and search for the above string and not use the 'mute' words I have selected.

If anyone can help me with this it would be much appreciated.

Regards,




[sig]<p>Matthew Wall<br><a href=mailto: > </a><br><a href= > </a><br> [/sig]
 
The key question is: Do you want to do this garbage collection before it gets to your db? -- If so, use Javascript. The latest version, 1.3, will allow you to use regular expressions and replace any text.

Or after? -- If so, use CF string functions.

Paul
[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top