RegularRegExpressionsEx101
Show Sidebar
Library entries
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
EN_US
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
ES_ES
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
FR_FR
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 hours ago
FR_CH
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 9 hours ago
Ex1
no description available
1
1 upvotes, 0 downvotes (100% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 10 hours ago
UNIMARC embedded to standard subfield
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
golang
Submitted by anonymous - a day ago
issue lookbehind
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
javascript
Submitted by anonymous - 2 days ago
rm everything btwn delimiters
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
python
Submitted by anonymous - 2 days ago
fail2ban-php404
no description available
0
0 upvotes, 0 downvotes (NaN% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 2 days ago
^[A-Z][a-z0-9_-]*( +[A-Z][a-z0-9_-]*)*$
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
AutoitParser Include
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
analytics config one line
no description available
1
1 upvotes, 0 downvotes (100% like it) (You must be signed in to vote)
pcre
Submitted by anonymous - 4 days ago
Asterisk Channel
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
GB_hw22
Image file detection (jpg or jpeg) at the link
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/ - a month ago
Discussion