Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Social
Join the Discord community!
Follow me on twitter!
Send me an email
Donate
Donate
Donate through Paypal
Become a Github Sponsor
Info
Info
Find out what's new!
RegEx101 Wiki
Report bugs or make suggestions
What's new?
Loading content...
Close
Regex Editor
Regex Editor
Community Patterns
Community Patterns
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Get help on Discord
Get help on IRC
Order By
Most Recent
Highest Score
Lowest Score
Most upvotes
Most downvotes
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET (C#)
Rust
Sponsors
Community Patterns
Search among 5,640 community submitted regex patterns...
7
8 upvotes, 1 downvotes (score 56.5%) (You must be signed in to vote)
simple email
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
8 years ago
2015-06-11 01:12
7
8 upvotes, 1 downvotes (score 56.5%) (You must be signed in to vote)
Extract currency with currency symbol if present
ECMAScript (JavaScript)
Extracts values of the form £nnn,nnn.nn or $nnn.nnn from text
Submitted by
Simon Gardner
-
8 years ago
2015-09-11 11:35
72
410 upvotes, 338 downvotes (score 56.4%) (You must be signed in to vote)
Regex for telephone numbers all over the world
Recommended
This entry has been specifically selected by our team to be a great submission
ECMAScript (JavaScript)
Detects most of the phone numbers all over the world
Submitted by
Aditya Joshi
-
10 years ago
2014-04-08 07:58
(Last modified 2 months ago)
2023-10-09 14:47
35
77 upvotes, 42 downvotes (score 55.8%) (You must be signed in to vote)
IP Address validator
ECMAScript (JavaScript)
Validates IPv4 IP Address
Submitted by
krzysp
-
8 years ago
2015-06-18 12:52
15
25 upvotes, 10 downvotes (score 54.9%) (You must be signed in to vote)
Hashtag
ECMAScript (JavaScript)
The secret of the Twitterverse.
Submitted by
Joogl
-
9 years ago
2014-10-05 17:14
11
16 upvotes, 5 downvotes (score 54.9%) (You must be signed in to vote)
Full url parse, domain, path, params
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
8 years ago
2015-08-25 20:54
9
12 upvotes, 3 downvotes (score 54.8%) (You must be signed in to vote)
English date in "dd mmmm yyyy" format
Python
Parse an English date following the "dd mmmm yyyy" format.
Submitted by
Tantale
-
9 years ago
2015-05-18 19:41
86
297 upvotes, 211 downvotes (score 54.1%) (You must be signed in to vote)
Password Validation
ECMAScript (JavaScript)
Checks that a password has a minimum of 6 characters, at least 1 uppercase letter, 1 lowercase letter, and 1 number with no spaces.
Submitted by
Christian Klemp
-
8 years ago
2015-07-08 18:46
11
17 upvotes, 6 downvotes (score 53.5%) (You must be signed in to vote)
find all link(<a>) tags expect your links in href attribute
ECMAScript (JavaScript)
YourLink - not found AnotherLink - found
Submitted by
KoT
-
8 years ago
2015-07-29 11:09
10
15 upvotes, 5 downvotes (score 53.1%) (You must be signed in to vote)
Valid Telephone Number
ECMAScript (JavaScript)
This regex validates varying types of telephone numbers.
Submitted by
Adam Recvlohe
-
8 years ago
2015-12-09 01:04
6
7 upvotes, 1 downvotes (score 52.9%) (You must be signed in to vote)
SO: fail2ban regular to find 403 request in nginx
Python
http://stackoverflow.com/q/25778420/2072035
Submitted by
anonymous
-
9 years ago
2014-09-15 11:32
(Last modified 4 months ago)
2023-07-27 20:59
6
7 upvotes, 1 downvotes (score 52.9%) (You must be signed in to vote)
TimezoneOffset
ECMAScript (JavaScript)
used to parse timezone in the format -08:00 or +05:30
Submitted by
Neha
-
9 years ago
2014-12-09 07:00
8
11 upvotes, 3 downvotes (score 52.4%) (You must be signed in to vote)
money: either 0 or 2 dp
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
8 years ago
2015-11-18 19:34
106
601 upvotes, 495 downvotes (score 51.9%) (You must be signed in to vote)
trim
ECMAScript (JavaScript)
trim string
Submitted by
fp
-
10 years ago
2013-09-10 08:21
24
67 upvotes, 43 downvotes (score 51.6%) (You must be signed in to vote)
Quote Macthing with escape
ECMAScript (JavaScript)
Matches text within quotes (", ') and escapes the charecters.
Submitted by
Vihan Bhargava
-
9 years ago
2015-05-10 20:48
11
19 upvotes, 8 downvotes (score 51.5%) (You must be signed in to vote)
html color match: transparent, #fff, #123456, rgb, rgba, hsl, hsla
ECMAScript (JavaScript)
This may be useful or not to test whether a given string is a valid (more or less) html color value. It matches color values such as: #123 - short hex color value #123456 - hex color value rgb(255,255,0) - rgb color value rgba(255,255,0,1.0) - rgba color value hsl(360,100%,100%) - hsl color value...
Submitted by
grouch
-
9 years ago
2014-12-17 13:00
34
123 upvotes, 89 downvotes (score 51.3%) (You must be signed in to vote)
Google like regex
ECMAScript (JavaScript)
Attempts to mimic Google search box behavior, returning an array with the separated search strings (that keep the +/- indicator for following operations)
Submitted by
mettjus
-
10 years ago
2014-05-12 13:35
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Equation matching (without equal)
Python
use this to get value of any side of an equation. You can combine this with https://regex101.com/r/fH5kJ1/1
Submitted by
Kerosene2000
-
8 years ago
2015-07-01 19:50
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Typescript - /// <reference path="..."/> Expression
ECMAScript (JavaScript)
Finds Typescript's reference path syntax.
Submitted by
Lovelidge, Shawn
-
8 years ago
2015-09-08 22:26
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
import url image
Python
import url image
Submitted by
bartimeys
-
8 years ago
2015-12-18 08:44
1
2
3
4
5
...
282
Regex for telephone numbers all over the world
72
410 upvotes, 338 downvotes (score 51.2%) (You must be signed in to vote)
Regular Expression
Recommended
This entry has been specifically selected by our team to be a great submission
ECMAScript (JavaScript)
/
(?:
(
[
+
]
\d
{1,4}
)
[
-.
\s
]
?
)?
(?:
[
(
]
(
\d
{1,3}
)
[
)
]
[
-.
\s
]
?
)?
(
\d
{1,4}
)
[
-.
\s
]
?
(
\d
{1,4}
)
[
-.
\s
]
?
(
\d
{1,9}
)
/
g
Open regex in editor
Description
Loading markdown...
Submitted by
Aditya Joshi
-
10 years ago
2014-04-08 07:58
(Last modified 2 months ago)
2023-10-09 14:47