Really got stuck on this simple regex. Need it to validate a string, that will be a mail without the “@domain.xxx”.
It must accomplish the following rules:
- there must be a string (only letters) starting.
- there must be a string (only letters) ending.
- this two strings must be separated by a dot.
- the complete string mustn’t contain any numbers or simbols.
I was trying with something like… /^[a-z]+$/^[.]+$/[a-z]+$/i …but no success.
will work for ASCII letters.
If you also want to allow international letters (äá etc.) try
[^\W\d_]means “Any character that not a non-alphanumeric character, not a number and not an underscore”.