At the moment, only one user give me the problem and I would to block this email.
This is the reply of Susan (regexadvice.com):
http://regexadvice.com/forums/ShowThread.aspx?PostID=56381#56381
.....
If you want to see if "@tyldd.com" is present in a string, then you can either simply use the pattern
@tylld\.com
as the pattern and it will return a match if it can find that literal text anywhere within the string. By the way, you can use a normal string function for this as well and not involve all of the overhead of a regex.
Alternatively you can modify your pattern to be:
\b[a-zA-Z0-9._%\-+']+@tylld\.com
As you can see, all I've done is to replace the pattern that matches the domain name with the literal domain name you are after.
If you want to exclude such an address, you can use a bit of code logic to use the above patterns to see if the domain exists and then take whatever action is necessary if it does.
If you are wanting to find all email addresses and then process the domain names later, you can use something like:
\b[a-zA-Z0-9._%\-+']+@([a-zA-Z0-9.\-]+\.[a-zA-Z]{2,4}\b)
which is your pattern with a match group around the domain name. This will find all of the email addresses and you can separately use the domain name captured in match group #1 to test for the "tylld.com" string.
As always, when I say "find all email addresses", this has the caveat that a regex pattern will never be 100% successful at finding all email addresses (or URLs). If the pattern you have found does the job for you then that is all that matters.
Susan