Parsing Strings in Enclosed in Curly Braces

xamalek at yahoo.com xamalek at yahoo.com
Fri May 15 12:12:24 EDT 2009


How do you parse a string enclosed in Curly Braces?

For instance:

x = "{ABC EFG IJK LMN OPQ}"

I want to do x.split('{} ') and it does not work. Why does it not work
and what are EXCEPTIONS to using the split method?

That I want to split based on '{', '}' and WHITESPACE.

Please advise.

Regards,
Xav



More information about the Python-list mailing list