Helllo,
I’m Using this for validating emails:
JavaScript:
RegExp(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/);
PHP:
preg_match("/^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$/i", $email)
These could easily validate the string to be like blah@blahblah.blah, BUT I also want to allow *@blahblah.blah, How those 2 rules should be edited for this?
Thanks for your help.
In regards to your PHP question, I would actually recommend an entirely different approach: filter_var is an excellent way to validate e-mail addresses and is part of the PHP modern framework. If you are running PHP 5.2+, that is.