I have created the following regex pattern in Golang flavor to catch valid / invalid email addresses:
\b([\w\.-]{5,30})@[\w\.-]+\.([A-Za-z]{2,3})\b
There is one constraint, the following email address should be invalid as well : example@example.com
so the only thing i could think of is adding this to the pattern:
\b([\w\.-]{5,30})@[^e][^x][\w\.-]+\.([A-Za-z]{2,3})\b
The issue is that using golang flavor, you cant negate groups, which makes it much harder.I tried a to create a regex pattern and it caught too many False positives.