New course! Every coder should learn Generative AI!
Try a free lesson+ 2
I guess this is not what you are looking for.
These e.g. would match:
x1@x.comx
x1@x.com.ng
You get one word-character, then a digit in front of the @ and one word-character behind.
There are slight different patterns. Here one from MSDN:
^(?(")(".+?(?<!\\)"@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-z][-0-9a-z]*[0-9a-z]*\.)+[a-z0-9][\-a-z0-9]{0,22}[a-z0-9]))$
You see, they are pretty complicated. But you find a good step-by-step explanation to it on MSDN, too:
https://docs.microsoft.com/en-us/dotnet/standard/base-types/how-to-verify-that-strings-are-in-valid-email-format