Regular Expressions (RegEx) Tutorial #15 - Email RegEx Pattern
HTML-код
- Опубликовано: 8 янв 2025
- Hey gang, in this RegEx tutorial we'll have a look at how to create an email regex pattern, to validate our user input in the email field.
DONATE :) - www.paypal.me/...
----- COURSE LINKS:
RegEx101 - regex101.com/
Course files - github.com/iam...
Atom editor - atom.io/a
CMDER - cmder.net/
======== Other Tutorials =========
----- NODE.JS TUTORIALS
• Node JS Tutorial for B...
----- MONGODB TUTORIALS
• MongoDB Tutorial for B...
----- SUBSCRIBE TO CHANNEL - / @netninja
======== Social Links ==========
Twitter - @TheNetNinja - / thenetninjauk
Patreon - / thenetninja
this like magic you are wizard…. Finally after months and months I wrote my own RegEx the first time and can stop copying it without any understanding
I'm so grateful for founding this amazing tutorial, the videos are short so it isn't overwhelming at the sime time it has lots of videos explaining each part. Finally learned regex
You make complex things turn into easy
Thank you so much. I Got headache when I saw RegExp tokens at first time but these videos helped me to understand how these token works
Such a great and informative video which demystified what is regex and how to use it correctly and nicely. Bravo!
Very useful. Email addresses are very difficult to validate though, and the truth is it doesn’t matter how thorough you make it there’s no guarantee the user will type it in correctly anyway. Usually a confirm email box is added. I would let most characters through apart from those that have potential for malicious input and just check for an @ and dot character. But no way is the perfect way.
For many days I was thinking to learning Regular expression, here I found best one
Best explanation ever. You have a talent, keep going. Thank you.
Plus (+) is also valid character before the @ symbol. I frequently use plus symbol when I'm sharing my email with the websites. It helps me to track down the spammers.
That feature is natively supported by Gmail and many of the email provider.
I dont get it can you explain how
You can't make definitive conclusions from your personal anecdotal experiences, or rely on proprietary vendors.
Anyway, the address specification is standardized in RFC 5322. It basically allows all printable ASCII characters except " (double quote) and \ (reverse solidus). The maximum length of the local part is 64 octets.
What a great tutorial, thanks a lot. I have been learning web dev myself wanting to switch careers and videos like yours help a lot. Many thanks.
Great to hear! :) thanks for your support Wojciech
I'm loving everything about this series of tutorials :))))
Thank youuuuuuuuuuuuuuuuuu !!!
This serie of videos was soooo helpful ! I'm grateful to you ❤
Don't know if it is worth noting, but within a character set, the dot('.') doesn't need to be escaped
God bless all the Ninjas in the world !
specially The Net Ninja !!
Thank you! Explained it in a easy way...
This was very helpful. Thank you for making this video!
Glad it was helpful! :) thanks for watching
Thanks a ton! You are a savior
I'm procrastinating to learn hard topics until you make the tuts
This was a HUGE help, thank you
Great Tutorials🔥🔥 Keep up the good work 💯💯
Great stuff, just what I need. Thanks
Great to hear! thanks for watching Stephen
Hello, Thank you once again for the awesome tutorials, just want to point out, emails can also have underscores ( _ ) similar to dashes ( - ), I guess all one needs to do to add it is to add an '_' symbol within the group, right. Thanks.
Hey, yeah, that's right :)
Before first lecture : WTF! is this - /^([a-z\d\.-]+)@([a-z\d-]+)\.([a-z]{2,8})(\.[a-z]{2,8})?$/
After last lecture : Oh! this is so easy to understand.
Thanks Net Ninja for this wonderful playlist on Regular Expressions .
This is great. How would you put it together, by not allowing the "submit" button not to work until all edits have been passed?
Thank you very much Bro! you made everything easy love it
Dot does not to be escaped if inside the character class, I believe. Please correct me if I am wrong. Awesome tutorial by the way...
thankyou you are a great teacher
no doubt, a great tutorial
Best explanation!!
jani pyara hya tu ... love you jani g
Hey I was just checking the codes in github and the js file is there but not the code.
As being your appreciative, i think you're forgot the "_" symbol for the left of the "@" symbol. I think there is no more lack about email expression.
amazing..really necessary
Thanks :)
Easy to understand
Thank you very much friend!!
I'm using this : ^([\w\.-]+)@([a-z\d-]+\.([a-z]{2,8})(\.[a-z]{2,8})?$
How can i fix this error? "Uncaught TypeError: Cannot read property 'test' of undefined"
5 dislikes from users who are debating the best RegEx for emails.
awesome! thank you
Tqs a lot.. May Allah bless u
what is the use of ^ (this symbol) ?
why every pattern starts with ^ ?
ruclips.net/video/RD3tMcFDjyo/видео.html
what about confirm password ? How to validate that ?
Very good!
You forgot to make it case insensitive. Even though emails are already case insensitite (meaning any email in all caps goes to the same address as its lowercase counterpart), capital letters shouldn't make the email address invalid.
Thank a lot sir
When you search for this on c# and this shows up, cmon youtube -__-
Not that this is a Dart/Flutter course, but there's a package in the pub called email_validator which precisely follows the specifications. There's a similar package for Perl called Mail::RFC822::Address that does the right thing again according to the standards. That module creates a regex up from smaller pieces, and for grins got expanded as www.ex-parrot.com/pdw/Mail-RFC822-Address.html . Yes, that page of text is the SMALLEST VALID REGEX for a legal email. If your handmade regex is any shorter than that, you will get false negatives. Specifically, the regex here fails on one of my addresses: fred&barney@stonehenge.com, and on one of my friend's addresses: *@qz.to. Yes, a solitary asterisk is a valid email localpart.
update@update this comes as valid email using above expression
:(
I think it won't. I tried.
validator.isEmail()
Thanks, for your playlist. But this RegEx wouldn't recognise my student e-mail: firstname.lastname@st.uni-domain.com . But this seams to be a speziell think because by some websites this e-mail causes problems.
The best Regex tutorials on RUclips, thanks Master Ninja !!
Thought underscore should be added as well
/^([a-z\d\.-_]+)@([a-z\d-_]+)\.([a-z]{2,8})([\.a-z]{2,8})?$/
Thanks a lot sir
You're welcome! :)