Artificial intelligent assistant

Sed how to extract text between two tags but including it I am trying to figure out why this command is not working for me: sed -n -e '/<a href=\(.*\)>/,/<\/a>/p' text.html On text.html we have something like... <somestupidstuff> <a href='teste'> teste </a> </somestupidstuff> The desired output is: <a href='teste'> teste </a> But what I get is: <somestupidstuff> <a href='teste'> teste </a> </somestupidstuff> Maybe I am not fully understanding the regex.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy ab0710bcf55f5ab4d3e716e446173c0a