I am looking for a valid regexp
for my email validation requirement. I tried several times, but it buggy.
here is my try: .*@[^\W_]+(?:[\w-]*[^\W_])
need to fit with:
xxx@_domain.com => invalid @ starts with _
xxx@domain_.com => invalid domain ends with _
[email protected] => invalid @ starts with - ( hypen)
[email protected] => invlaid domain ends with - (hypen)
[email protected] => invalid domain start with - (hypen)
[email protected] => invalid domain only contains numbers
[email protected] => valid domain contains both number and chars
[email protected] => valid
[email protected] => valid
[email protected] => valid
[email protected] =>
xxx@abc_efg.com => valid _ inside the chars
[email protected] => valid _ start with
any one help me?