Вот моя проблема: если код выглядит так:
Код: Выделить всё
html_code = """[url=test.html]This[/url] is an [url=example.html]example[/url]"""
Код: Выделить всё
re.sub("""[url=.*]""", "", html_code)
Код: Выделить всё
example[/url]
Код: Выделить всё
This is an [url=example.html]example[/url]
Подробнее здесь: https://stackoverflow.com/questions/785 ... expression