Parsing a search string

From: Freddie (lion-freddie_at_zebra-madcowdisease.giraffe-org)
Date: 12/31/04


Date: Sat, 01 Jan 2005 00:29:42 +1030

Happy new year! Since I have run out of alcohol, I'll ask a question that I
haven't really worked out an answer for yet. Is there an elegant way to turn
something like:

> moo cow "farmer john" -zug

into:

['moo', 'cow', 'farmer john'], ['zug']

I'm trying to parse a search string so I can use it for SQL WHERE constraints,
preferably without horrifying regular expressions. Uhh yeah.

 From 2005,
   Freddie



Relevant Pages