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 17,400 community submitted regex patterns...
7
17 upvotes, 10 downvotes (score 44.2%) (You must be signed in to vote)
split URL into location-resource-params (JavaScript)
ECMAScript (JavaScript)
Extract resource location, name and query parameters from a URL (JavaScript version)
Submitted by
cebence
-
10 years ago
2014-05-22 17:18
4
95 upvotes, 91 downvotes (score 43.9%) (You must be signed in to vote)
Phone number
PCRE (PHP <7.3)
no description available
Submitted by
Mark Landry
-
8 years ago
2015-06-23 19:15
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
SQL select columns
PCRE (PHP <7.3)
no description available
Submitted by
Phan
-
10 years ago
2013-09-07 13:09
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Task 2, part 1
PCRE (PHP <7.3)
Finds all source numbers in square brackets
Submitted by
Kovalev Evgeny
-
10 years ago
2014-02-25 06:13
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
how to match both lines?
Python
f_name may contain spaces, numbers, characters,... so I would go for a but then I couldn't use [...]? anymore to match the second line?
Submitted by
anonymous
-
9 years ago
2014-07-22 09:38
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Find URLs in markdown where the lines have been wrapped
Python
no description available
Submitted by
anonymous
-
9 years ago
2014-08-26 21:13
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
TimezoneOffset
ECMAScript (JavaScript)
parses timezones in the format -08:00 or -8:0
Submitted by
Neha Kadam
-
9 years ago
2014-12-09 07:38
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
URL with matching categories
PCRE (PHP <7.3)
Finds the protocol, subdomain, ((domain, extension)/ipaddress), port, filepath (split in path and filename), the route and the query string.
Submitted by
fps
-
9 years ago
2015-01-26 20:38
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Smart Target Blank
ECMAScript (JavaScript)
Allow you to check if the JavaScript location.pathname is a link required adding a target="_blank".
Submitted by
Bruno Lesieur
-
9 years ago
2015-02-02 16:57
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Request mask idea
ECMAScript (JavaScript)
Do you like apis and nodejs as I do?, then this must be for you, have you noticed that all the famous apis have a common functionality? the ability to request partial responses with masks, so if you have a friend list you may want to return only a few fields you know just in case. You will end up re...
Submitted by
Marco Villarreal<erick.slayer.m.v@gmail.com>
-
9 years ago
2015-04-11 19:49
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
javascript regex ftp directory list
ECMAScript (JavaScript)
javascript regex ftp directory list
Submitted by
anonymous
-
8 years ago
2015-06-23 11:55
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Cisco ASA
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-06-29 12:57
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Italian ZIP code (CAP)
ECMAScript (JavaScript)
Codice avviamento postale Italiano (ZIP)
Submitted by
Italo
-
8 years ago
2015-07-03 13:40
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
@font-face stuff
PCRE (PHP <7.3)
bits and pieces of reusable replacements in CSS @font-face rules
Submitted by
mroncetwice
-
8 years ago
2015-07-10 21:46
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Roman numeral detector
PCRE (PHP <7.3)
Detects valid Roman numerals (up to 3999), and splits into 4 capture groups: thousands, hundreds, tens, and units.
Submitted by
Terence Linnell
-
8 years ago
2015-07-11 18:42
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
sql: insert into
PCRE (PHP <7.3)
insert into (a,b,c) values (1,2.3,"test");
Submitted by
suat erenler - sua.gen.tr
-
8 years ago
2015-07-25 11:00
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
hj
PCRE (PHP <7.3)
hj
Submitted by
hj
-
8 years ago
2015-08-03 18:39
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Match a URL from a text message
ECMAScript (JavaScript)
I use this to match the first url present in a text message.
Submitted by
anonymous
-
8 years ago
2015-08-06 06:16
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
currency
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-08-12 20:06
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Currencies
PCRE (PHP <7.3)
Matches numbers formatted like currencies
Submitted by
elgehelge
-
8 years ago
2015-08-17 14:14
1
...
6
7
8
9
10
11
12
...
870
TimezoneOffset
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Regular Expression
ECMAScript (JavaScript)
/
^
(
[
+|-
]
{1}
)
(
[
0
-
1
]
{0,1}
[
0
-
9
]
{1}
)
:
(
[
0
-
6
]
{0,1}
[
0
-
9
]
{1}
)
$
/
Open regex in editor
Description
Loading markdown...
Submitted by
Neha Kadam
-
9 years ago
2014-12-09 07:38