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?

Thanks a bunch,

Matts 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:313354
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