Parsing a search string

Freddie lion-freddie at zebra-madcowdisease.giraffe-org
Fri Dec 31 08:59:42 EST 2004


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




More information about the Python-list mailing list