DEV Community

Discussion on: 4 Practical Use Cases for Regular Expressions

 
nateosterfeld profile image
Nate Osterfeld

Is a master at regular expressions, yet doesn't know basic markdown?! How can this be haha

Also in this regexp and as a nooby...

 /^[a-zA-Z0-9.!#$%&*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/

what in the world is .!$%&'*+/=?^_`{|}~-]+ supposed to mean???

Thread Thread
 
deleteman123 profile image
Fernando Doglio

Hey, I'm no master by any means!
I have, however, played around with them quite a lot.
AS for the list of characters you listed, I actually explained in below the code snippet.
This entire chunk (which includes part of your question:

[a-zA-Z0-9.!#$%&’*+/=?^_`{|}~-]

Checks that the start of the string has valid characters, meaning, characters that a username inside an email address can have (as Wikipedia mentions here: en.wikipedia.org/wiki/Email_addres...).