On Wed, Oct 1, 2008 at 2:36 PM, Charlie Griefer
<[EMAIL PROTECTED]>wrote:

> On Wed, Oct 1, 2008 at 2:09 PM, Developer MediaDoc <
> [EMAIL PROTECTED]> wrote:
>
>> Hi All,
>>
>> Have NOT ventured into regular expressions much at all. Now I have the
>> need for one, and wonder if anyone has one made for this scenario.
>>
>> Search engine, want user to be able to enter multiple words, also phrases.
>> Want my SQL to loop over the phrases and words with an AND... (the SQL I can
>> handle!).
>>
>> For example, user types in "Healthy Eating" kids schools "Ontario Canada"
>>
>> ReMatch would produce an array of
>> Healthy Eating
>> kids
>> schools
>> Ontario Canada
>>
>> my SQL search would loop over these 4 words/phrases.
>>
>> I've found a PHP regex that does this exact thing.. but the syntax must be
>> different in CF and PHP for the regex part.
>>
>> preg_match_all('#(?:"([^"]+)")|([^ ]+)#', trim($keywords), $match_words);
>>
>> Anyone have a CF equivalent?
>>
>
> listToArray(keywords, ' ')  :)
>

ah crap i oughtta read the question better, eh?  that won't work with the
quoted phrases in the string.  maybe it'll kinda give a jumpstart at least
:)

-- 
I have failed as much as I have succeeded. But I love my life. I love my
wife. And I wish you my kind of success.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313358
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to