RegularRegExpressionsEx101
Show Sidebar
Library entries
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 2 hours ago
Partial Substitutions
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 15 hours ago
UNI
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 21 hours ago
Replace IPFS Private Key
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - a day ago
sudo transform
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - a day ago
URL Validation
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 3 days ago
Process
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 3 days ago
TRIM
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 3 days ago
AD circle
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 4 days ago
FAR w/ Month, Year
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 4 days ago
page range
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 4 days ago
Search Specific Content
Search Specific Content
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 4 days ago
JDBC mysql string
no description available
Library Entry
Close
Email regex validation
javascript
/
^((?!\.)[\w-_.]*[^.])(@\w+)(\.\w+(\.\w+)?[^.\W])$
/
gm
Description

RegEx email

/^((?!\.)[\w-_.]*[^.])(@\w+)(\.\w+(\.\w+)?[^.\W])$/gim;

Just playing with Reg Ex. This to validate emails in following ways

  • The email couldn't start or finish with a dot
  • The email shouldn't contain spaces into the string
  • The email shouldn't contain special chars (<:, *,ecc)
  • The email could contain dots in the middle of mail address before the @
  • The email could contain a double doman ( '.de.org' or similar rarity)

Groups

There was created 3 groups into this validations that could be used for custom purposes or replacements

mailname@domain.com

  • First group takes the first string with the name of email $1 => (mailname)
  • Second group takes the @ plus the domain: $2 => (@domain)
  • Third group takes the last part after the domain : $3 => (.com)
Submitted by https://www.linkedin.com/in/peralta-steve-atileon/ - 4 months ago
Discussion