I think the important part is everything between the pound signs. So your RegEx is
(?:"([^"]+)")|([^ ]+) just use this with your favorite function Just use the ReFindNoCase(), or ReFind() functions with the returnsubexpressions attribute set to true. then it's a matter of using other functions (mid, left etc) to grab the values and slam them into an array. Maybe someone will be more elegant, i'm do busy crashing servers to work it all out :) jonese http://www.jonese.us http://twitter.com/jonese On Wed, Oct 1, 2008 at 5: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, ' ') :) > > -- > 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:313361 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4