Regular
Expressions
101
Please wait while the app is loading...
Please enable JavaScript to use this web application.
Regular
Expressions
101
@regex101
Donate
Sponsor
Contact
Bug Reports & Feedback
Wiki
What's new?
What's new?
Loading content...
Close
Regex Editor
Regex Editor
Regex Library
Regex Library
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Order By
Most Recent
Most Points
Fewest Points
Filter by Flavor
PCRE2
PCRE
ECMAScript
Python
Golang
Java
.NET
Sponsors
All your environment variables, in one place
Library entries
Search library
7
30 upvotes, 23 downvotes (57% like it) (You must be signed in to vote)
python
Extract Protocol, URL, URL Path, get parameters and hash from URI
This is simplified from my last submission.
Submitted by
Dale O'Brien
-
9 years ago
7
9 upvotes, 2 downvotes (82% like it) (You must be signed in to vote)
pcre
Sentence grabber /w extra check
Grabs sentences including terms like: e.g. z.b. Figs.These get caught in 1st capturing group. Problem: how to only accept matching sentences which contain pattern \b\d+[a-z]{0,2}\b?
Submitted by
light0
-
9 years ago
7
21 upvotes, 14 downvotes (60% like it) (You must be signed in to vote)
javascript
if, else if, else condtion match
matches full if condition statment eg: if(condition){ ... } else if(condition){ ... }else{...
Submitted by
Ivan Jakesevic
-
9 years ago
7
19 upvotes, 12 downvotes (61% like it) (You must be signed in to vote)
javascript
simple common lisp tokenizer
main symbols and comments are supported
Submitted by
d4rw1n1s7@gmail.com
-
8 years ago
7
10 upvotes, 3 downvotes (77% like it) (You must be signed in to vote)
pcre
rsyslog test
global modifier
Submitted by
dtmland
-
8 years ago
7
22 upvotes, 15 downvotes (59% like it) (You must be signed in to vote)
javascript
Match text (not within html tag)
no description available
Submitted by
Moistly
-
8 years ago
7
8 upvotes, 1 downvotes (89% like it) (You must be signed in to vote)
pcre
validate US (5 & 9 digit) ZipCodes and CA PostalCodes
no description available
Submitted by
anonymous
-
8 years ago
7
8 upvotes, 1 downvotes (89% like it) (You must be signed in to vote)
javascript
simple email
no description available
Submitted by
anonymous
-
8 years ago
7
11 upvotes, 4 downvotes (73% like it) (You must be signed in to vote)
javascript
RFC 3987 compliant URL regex
This is a JavaScript port of the URL regex from http://stackoverflow.com/a/190405/384062 that includes a bug fix and some optimization. Mathias Bynens's Regenerate was used to convert unicode escapes. Bug fix: Eliminated stray | falsely allowing querystring to contain | ...
Submitted by
Hans Meyer
-
8 years ago
7
46 upvotes, 39 downvotes (54% like it) (You must be signed in to vote)
javascript
Date validation
Besides leap year handling, this takes care of date validation in the yy-mm-dd format.
Submitted by
anonymous
-
8 years ago
7
8 upvotes, 1 downvotes (89% like it) (You must be signed in to vote)
javascript
youtube url match
extract video id, index, play list id from youtube url
Submitted by
anonymous
-
8 years ago
7
10 upvotes, 3 downvotes (77% like it) (You must be signed in to vote)
pcre
Any positive integer except zero
no description available
Submitted by
Harsh
-
8 years ago
7
8 upvotes, 1 downvotes (89% like it) (You must be signed in to vote)
javascript
Extract currency with currency symbol if present
Extracts values of the form £nnn,nnn.nn or $nnn.nnn from text
Submitted by
Simon Gardner
-
8 years ago
7
8 upvotes, 1 downvotes (89% like it) (You must be signed in to vote)
pcre
Remove Widows (PHP)
Adds a non-breaking space between the last two words of sentences
Submitted by
herkulano
-
8 years ago
7
10 upvotes, 3 downvotes (77% like it) (You must be signed in to vote)
javascript
Date and time format - ISO 8601
Matches ISO 8601 date formats
Submitted by
Ettienne
-
7 years ago
7
8 upvotes, 1 downvotes (89% like it) (You must be signed in to vote)
python
extract subdomain(if available) or domain from URL
This regex should extract the subdomain, if any, or the domain, if no subdomain is used, from an arbitrary URL
Submitted by
trevi@twanda.com
-
7 years ago
6
6 upvotes, 0 downvotes (100% like it) (You must be signed in to vote)
python
Conventional Commits validation
This regex prevents the writing of non-standard conventional commits. I'm available on my github
Submitted by
Krisque
-
a year ago
6
28 upvotes, 22 downvotes (56% like it) (You must be signed in to vote)
pcre
Matching balanced parens, brackets, and braces
no description available
Submitted by
Noah Luck Easterly
-
10 years ago
6
150 upvotes, 144 downvotes (51% like it) (You must be signed in to vote)
javascript
Password
no description available
Submitted by
anonymous
-
9 years ago
6
10 upvotes, 4 downvotes (71% like it) (You must be signed in to vote)
javascript
Split quotes and single words
Find " and ' quoted strings and "orphaned"/single words in a string
Submitted by
LoveIsGrief
-
9 years ago
1
2
3
4
5
6
7
8
...
755
Password Validation
Vote
85
296 upvotes, 211 downvotes (58% like it) (You must be signed in to vote)
Regular Expression
javascript
/
^
(
(?=
\S
*
?
[
A
-
Z
]
)
(?=
\S
*
?
[
a
-
z
]
)
(?=
\S
*
?
[
0
-
9
]
)
.
{6,}
)
\S$
/
Open regex in editor
Description
Loading markdown...
Submitted by
Christian Klemp
- 8 years ago