Forum OpenACS Q&A: Re: Howto: PHRASE and Word Parse

Collapse
Posted by Jonathan Ellis on
this is what I use:

-- escape out all \,$,[,],; with backslash
-- then use eval list instead of split to preserve quoted terms
regsub -all {[\\\$\[\];]} $1 {\\&} search_string
set search_words [eval list $search_string]

this does NOT handle odd numbers of " at ALL; it will error out.  but it does group the evenly quoted args as desired.