ummm lets see....
<cfoutput>
<cfset Inthis = "Blah other blah...string is about 150 chars">
<cfset wasfound = ReFindNoCase("this|other|about", InThis)>
<!--- if something was found --->
<cfif wasfound NEQ "0">
<!--- get everything to the right starting with the position that was
found --->
<cfset rest = right(InThis, len(InThis) - (wasfound-1))>
<!--- treat it as a list and grab the first entry delimited by spaces --->
#listfirst(rest, " ")#
</cfif>
</cfoutput>
that LOOKS like it should work
----- Original Message -----
From: "W Luke" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Sunday, June 01, 2003 4:02 AM
Subject: Re: Finding multiple items (without cfloop)
> "Ewok" <[EMAIL PROTECTED]> wrote in message
> news:<[EMAIL PROTECTED]>...
> > 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
>
> Sorry, just one more; is it possible for it to return *which* item, if
> any, that it found?
>
> 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
Host with the leader in ColdFusion hosting.
Voted #1 ColdFusion host by CF Developers.
Offering shared and dedicated hosting options.
www.cfxhosting.com/default.cfm?redirect=10481
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4