I have a regular expression I got from Internet to match URL links in <a>
tags. It appears as below:
variable = re.compile('<a\s(?:.*?\s)*?href=[\'"](.*?)[\'"].*?>')
Would anyone please explain me how exactly is this patten going to match the contents of an <a>
tag?
I have basic understanding of regular expression in Unix but this looks too complicated for me and appreciate anybody explaining this to me.