Regex for email address without characters validation -


i need regex check (if email a@b.cc:

  • email must have @ , . (must have both). refer whole string must contain @ , @ least 1 dot.

  • 1st word of email must have 1+ char

  • the domain name between @ , . must 1+ char

  • tld must 2+ char

i made regex .+@.+\. it's not one, know. bad in regex use rarely.

can me?

it's not clear if matching email in middle of paragraph of text, or matching extracted string. assuming latter, , anchoring match start , end of line...

/^.+@.+\.[^.]{2,}$/ 

regex railroads

p.s. using regex validate emails complex: http://www.regular-expressions.info/email.html


Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -