I have this regexp that matches correctly everything I need (all the email addresses NOT inside a link):
By definition, you have to look behind to know there is no starting link tag <a> before the email address.
You can try:
- match each email address, and then verify that the email address is not inside a link programmatically
- use AJAX send the data to your server, and get your server to do the Regex.