something like this should work
<cfset Inthis = "Blah other blah...string is about 150 chars">
Was there a match? #YesNoFormat(ReFindNoCase("this|other|about", InThis))#
it will return the position of the first character of the first word it
matches
in your sentence "other" woud be found first "o" is at position 6 so it
would return "yes"
anything other than 0 is a positive return
----- Original Message -----
From: "W Luke" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, May 31, 2003 4:06 PM
Subject: Finding multiple items (without cfloop)
> Is there a function that can find one of 3 (or more) values in a string?
> Eg:
>
> Tofind = "this,that,other"
> Inthis = "Blah other blah...string is about 150 chars"
>
> I can't use cfloop for various reasons - is there a quick function
> that'll do this? I thought about findoneof() but I don't think this'll
> work without using cfloop.
>
> Thanks again
>
> Will
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
http://www.cfhosting.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4