Well, I know that I could write a regexp, but if I were to spend the half hour to do so, I'm afraid your reply would be "but Python doesn't support 5.10 regexes yet".
Frankly, I think you're better off asking Python questions in a Python forum.
Comment on Re^3: Help with regex for complicated key=value string