The regex that I'm using can't capture the entire email adress from an html tag. It removes/doesn't read the final/top-level domain.
My regex pattern looks like this:
(?<!mailto:)(?<=^|[^A-Za-z0-9_\-\.+@])[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,})(?!\<\/a\>)
The image above is from when I tested my regex using an online regex tester. What the image displays is also the output I get when I try to get the email and print it on my website. It leaves out the final domain, instead of grabbing "testing.user@dom.longdomain.se" it only gets "testing.user@dom.longdomain". But when I leave out the html tag it can read it perfectly fine.
Any idea on what my regex is missing or if I'm looking at it incorrectly?