i find myself spending alot of time writing routines to parse complex
strings. here's a mock example string of my current problem:

a<b>[c]{d}"e"f {{g}} [[h]]*i**j*"k"

and i want to parse this into an array like so:

['a','<b>','[c]','{d}','"e"','f','{{g}}','[[h]]','*i*','*j*','"k"']

for clearity here's another example:

"a"{{b}}c{d}<e>  ->  ['"a"','{{b}}','c','{d}','<e>']

i have found such strings difficult to parse for a number of reasons.
first, the text in double-quotations could contain bracket symbols but
must be treated as plain text. second, [ and { brackets can be nested as
in g and h of the first example. and finally, because whitespace can
optionally occur between the parts.

i wish ruby had some sort of parsing tool to make this childs play.

can any of you geniuses out there offer an elegent solution? my current
code dosen't work 100% and is like 90+ lines long. ugghh!

~transami