I have a a previously matched pattern such as:
<a href="somelink here something">
Now I wish to extract only the value of a specific attribute(s) in the tag such but this may be anything an occur anywhere in the tag.
regex_pattern=re.compile('href=\"(.*?)\"')
Now I can use the above to match the attribute and the value part but I need to extract only the (.*?)
part. (Value)
I can ofcourse strip href="
and "
later but I'm sure I can use regex properly to extract only the required part.
In simple words I want to match
abcdef=\"______________________\"
in the pattern but want only the
____________________
Part
How do I do this?