I want to be able to capture the value of an HTML attribute with a python regexp. currently I use
re.compile( r'=(["\'].*?["\'])', re.IGNORECASE | re.DOTALL )
My problem is that I want the regular expression to "remember" whether the attribute started with a single or a double quote.
I found the bug in my current approach with the following attribute
href="javascript:foo('bar')"
my regex catches
"javascript:foo('