Hello!
I want get all mathes from this expression:
import re
def my_handler(matches):
return str(matches.groups())
text = "<a href='#' title='Title here'>"
print re.sub("<[a-zA-Z]+( [a-zA-Z]+=[\#a-zA-Z0-9_.'\" ]+)*>", my_handler, text)
Actual result:
(" title='Title here'",)
Expected result:
("a", " href='#'", " title='Title here'",)
Please, help me understang, how to do this. Note, that I have many tags in text.