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, ' ') :)
--
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:313357
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4