[thelist] CF Search problem

Matthew Walker matthew at electricsheep.co.nz
Thu May 11 19:42:47 2000


> database? or is there a way to strip off the The or A when it
> occurs at the
> beginning of a string?

Well, if you're using <CFSEARCH> why not get rid of all the "a"s, "the"s
etc.?

<cfset MySearchString=Trim(ReplaceList(" " & LCase(MySearchString) & " ", "
a , the , an "," , , "))>

<cfset MySearchString="The Heart of the matter">
<cfset MySearchString=Trim(ReplaceList(" " & LCase(MySearchString) & " ", "
a , the , an "," , , "))>
<cfoutput>#MySearchString#</cfoutput>

If not then why not just use, <cfif LCase(Left(MySearchString, 4)) EQ "the
"> ...

Regards,
Matthew Walker
Electric Sheep Web Co.
http://www.electricsheep.co.nz/

--
Tel +64-3-374 2137
Fax +64-3-377 7930
P O Box 13-907, Armagh
Christchurch 8031
New Zealand