Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Python by (16.4k points)
Is there a decent method to check a structure input utilizing regex to ensure it is a legitimate style email address? Been looking since the previous evening and everyone that has responded to individuals' inquiries in regards to this theme additionally appears to have issues with it on the off chance that it is a subdomain email address.

1 Answer

0 votes
by (26.4k points)

There is no point. Regardless of whether you can confirm that the email address is linguistically valid, you'll actually have to watch that it was not mistyped and that it really goes to the individual you figure it does. The best way to do that is to send them an email and have them click a connect to check. 

Hence, a most fundamental check (for example that they didn't coincidentally enter their road address) is normally enough. Something like: it has precisely one @ sign, and in any event one. in the part after the @:

[^@]+@[^@]+\.[^@]+

You'd presumably likewise need to deny whitespace - there are presumably substantial email addresses with whitespace in them, however, I've never seen one, so the chances of this being a client mistake are your ally.

Join the python online course fast, to learn python concepts in detail and get certified.

Related questions

0 votes
1 answer
0 votes
1 answer
+1 vote
1 answer
asked Aug 5, 2019 in Python by Sammy (47.6k points)
0 votes
1 answer
+1 vote
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...