Question about parsing a string

2005-10-10 Thread Nico Grubert
Hi there, I would like to parse a string in Python. If the string is e.g. '[url=http://www.whatever.org][/url]' I would like to generate this string: 'a href=http://www.whatever.org;http://www.whatever.org/a' If the string is e.g. '[url=http://www.whatever.org]My link[/url]' I would like to

Re: Question about parsing a string

2005-10-10 Thread Fredrik Lundh
Nico Grubert wrote: I would like to parse a string in Python. If the string is e.g. '[url=http://www.whatever.org][/url]' I would like to generate this string: 'a href=http://www.whatever.org;http://www.whatever.org/a' If the string is e.g. '[url=http://www.whatever.org]My link[/url]' I

Re: Question about parsing a string

2005-10-10 Thread Alex Martelli
Nico Grubert [EMAIL PROTECTED] wrote: Hi there, I would like to parse a string in Python. If the string is e.g. '[url=http://www.whatever.org][/url]' I would like to generate this string: 'a href=http://www.whatever.org;http://www.whatever.org/a' If the string is e.g.