Splitting string into dictionary

David Pratt fairwinds at eastlink.ca
Fri Jul 1 01:53:41 EDT 2005


Pretty amazing Devan!  Great regex!  Thank you.

Regards,
David

On Friday, July 1, 2005, at 02:29 AM, Devan L wrote:

> One line solution.
> dict(re.findall(r"'(.+?)' \| '(.+?)'(?:\s\||$)",yourtexthere))
>
> -- 
> http://mail.python.org/mailman/listinfo/python-list
>



More information about the Python-list mailing list