I want to build a little bash script to detect some mails in a HTML-code. currently, I am not sure how can I build the right regex to auto-detect emails from HTML.
I tried this regex with curl:
egrep -o "\S*@.*\.\S*"
But this includes all non-alpha characters until the first space.
For a little example:
</span></p><p class="footertext"><span style="color: rgb(255, 255, 255);">Email </span><br><a href="mailto:regex@mydomain.com" style="color: rgb(255, 255, 255);"
Now I want to auto-detect only this part: regex@mydomain.com
Does somebody have any idea?
cheers