Don't use pyparsing, it's horribly slow. I would post my regex example here if pasting into stackoverflow worked.
pyparsing
regex