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 9,320 community submitted regex patterns...
8
17 upvotes, 9 downvotes (score 46.2%) (You must be signed in to vote)
Alphanumeric and Spaces
PCRE (PHP <7.3)
Alow alphanumeric characters and spaces
Submitted by
JTN
-
8 years ago
2015-08-22 06:46
(Last modified 5 months ago)
2023-07-20 10:55
11
42 upvotes, 31 downvotes (score 46.1%) (You must be signed in to vote)
Date(Including Leap Year) YYYY-MM-DD hh:mm:ss
PCRE (PHP <7.3)
Validates DateTime of format YYYY-MM-DD hh:mm:ss including Leap Year
Submitted by
Madhan
-
10 years ago
2014-03-14 16:49
8
18 upvotes, 10 downvotes (score 45.8%) (You must be signed in to vote)
Date time Advanced
PCRE (PHP <7.3)
no description available
Submitted by
Mr.Neutro
-
10 years ago
2013-12-03 19:19
7
14 upvotes, 7 downvotes (score 45.4%) (You must be signed in to vote)
PAN CARD validation
PCRE (PHP <7.3)
checks for valid PAN card for Indian users.
Submitted by
karan thakkar
-
10 years ago
2014-05-06 07:06
5
7 upvotes, 2 downvotes (score 45.3%) (You must be signed in to vote)
parsing CSV file
PCRE (PHP <7.3)
It correctly handles simple values, empty values, and quoted values with commas inside.
Submitted by
Viktor Lova aka nsinreal
-
9 years ago
2015-03-09 19:02
5
7 upvotes, 2 downvotes (score 45.3%) (You must be signed in to vote)
Latitude,Longitude fetcher
PCRE (PHP <7.3)
Useful to work with GoogleMap API.
Submitted by
anonymous
-
8 years ago
2015-08-07 08:25
5
7 upvotes, 2 downvotes (score 45.3%) (You must be signed in to vote)
ipv6
PCRE (PHP <7.3)
Match an ipv6 address
Submitted by
Frusty
-
8 years ago
2016-05-25 09:37
9
35 upvotes, 26 downvotes (score 44.9%) (You must be signed in to vote)
only numbers
PCRE (PHP <7.3)
A string with only numbers in
Submitted by
Gotts
-
8 years ago
2015-11-26 16:19
9
67 upvotes, 58 downvotes (score 44.9%) (You must be signed in to vote)
Youtube ID match
PCRE (PHP <7.3)
This regex will match any Youtube video ID thrown at it and return one capturing group containing the ID.
Submitted by
Jacob Overgaard
-
10 years ago
2013-11-28 13:30
8
23 upvotes, 15 downvotes (score 44.7%) (You must be signed in to vote)
Validate Base64 single-line string
PCRE (PHP <7.3)
no description available
Submitted by
ka.
-
11 years ago
2013-05-31 00:35
6
11 upvotes, 5 downvotes (score 44.4%) (You must be signed in to vote)
HTML tag stripper
PCRE (PHP <7.3)
This regex will identify all html start and end tags.
Submitted by
anonymous
-
8 years ago
2015-10-29 12:03
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)
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)
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)
@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
1
2
3
4
5
6
7
8
...
466
Get ip address (only ipv4) Validator
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
.NET (C#)
@"
(?:
(?:
[
a
-
f0
-
9
]
*
)?
:
){1,7}
[
a
-
f0
-
9
]
*
|
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
"
gmi
Open regex in editor
Description
Loading markdown...
Submitted by
Mr.Tang
-
10 months ago
2023-02-21 12:10
(Last modified 10 months ago)
2023-02-21 12:15