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 2,460 community submitted regex patterns...
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
identify and extract Laravel-style route parameters
PCRE2 (PHP >=7.3)
Extracts a table/model name, and optionally a column name. Enforces well-formed parameters. Tested with /category/{aYes:bYes}/{cYes}/{dNo:}/{eNo:/{:fNo}
Submitted by
Martin Holt
-
6 months ago
2023-06-22 22:40
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Single line of .env file
PCRE2 (PHP >=7.3)
Parse a single line of a .env file From repo dotenv - source code here.
Submitted by
Mot (https://github.com/motdotla)
-
5 months ago
2023-07-03 20:25
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Extract schema and domain from URI.
PCRE2 (PHP >=7.3)
Doesn't work on domains that include dashes (after the dash).
Submitted by
Roke Julian Lockhart Beedell
-
5 months ago
2023-07-04 22:27
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Sri Lankan NIC Validation Regex - Sri Lanka - National Identity Card Number Validation Regex
PCRE2 (PHP >=7.3)
Extract the Data from Sri Lankan National Identity Card The SL NIC could be divided into two groups, Before 2016 (9 alphanumeric digits with one English letter) After 2016 (12 alphanumeric digits) NICs issued before 1 January 2016, each NIC has a unique 9-digit number and a letter, in the for...
Submitted by
Aadhil Ahamed (Find me on GitHub: https://github.com/AadhilMR)
-
5 months ago
2023-07-09 07:25
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
终端控制序列
PCRE2 (PHP >=7.3)
匹配终端控制序列
Submitted by
anonymous
-
5 months ago
2023-07-10 09:03
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Universal Phone Regex
PCRE2 (PHP >=7.3)
Just a simple regex to detect phone numbers Should work in just about any regex flavor.
Submitted by
anonymous
-
5 months ago
2023-07-11 02:52
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
JavaScript String Matcher
PCRE2 (PHP >=7.3)
Matches comments, strings, templates, and regexes from javascript code. also matches templates recursively in order to correctly get template data
Submitted by
ephf
-
5 months ago
2023-07-19 18:11
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
e_itcd_protocol_match
PCRE2 (PHP >=7.3)
Match an e-ITCD protocol inside a list
Submitted by
davidbragat
-
4 months ago
2023-08-01 12:52
(Last modified 4 months ago)
2023-08-01 12:57
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Remove specific character in beginning & last
PCRE2 (PHP >=7.3)
Remove specific character in beginning & last
Submitted by
anonymous
-
4 months ago
2023-08-03 06:54
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Email Validation General (miscrosoft email rule)
PCRE2 (PHP >=7.3)
^([a-z0-9]+(?:([-]+|[.])[\w-]+|[-]))@([a-z0-9]+(?:([.-]\w+)\.)[a-z]{2,13})$
Submitted by
Riki
-
4 months ago
2023-08-03 07:08
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Test email for 99% of possible issues
PCRE2 (PHP >=7.3)
This is written using several other developer's work with my tying it all together and adding a few small requirement of my own. allows Latin characters (“a” - “z” or “A” - “Z”) within the email address. permits digits (0 - 9) in the email address. enforces domain part restrictions. allows hyphens ...
Submitted by
anonymous
-
4 months ago
2023-08-03 15:29
(Last modified 4 months ago)
2023-08-03 15:31
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
one line html
PCRE2 (PHP >=7.3)
matches html
Submitted by
anonymous
-
4 months ago
2023-08-04 17:30
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
test
PCRE2 (PHP >=7.3)
mail, pass, ...
Submitted by
anonymous
-
4 months ago
2023-08-05 17:53
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
jerry_eth_match
PCRE2 (PHP >=7.3)
jerry_eth_match
Submitted by
rin
-
4 months ago
2023-08-07 08:52
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
IPv6 前缀格式
PCRE2 (PHP >=7.3)
IPv6 前缀格式
Submitted by
anonymous
-
4 months ago
2023-08-08 04:21
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Get type from calypso XML
PCRE2 (PHP >=7.3)
How to get type from calypso XML by key words
Submitted by
AlexMia
-
4 months ago
2023-08-08 13:11
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
File path parser
PCRE2 (PHP >=7.3)
Parses a file path into 3 capture groups: 1: path (may be empty) 2: filename (required) 3: extension (may be empty)
Submitted by
Perigoso
-
4 months ago
2023-08-09 13:54
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
html <Title>
Java 8
htnle
Submitted by
erichologist
-
4 months ago
2023-08-09 16:02
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
匹配markdown代码块
PCRE2 (PHP >=7.3)
组1:编程语言 组2:代码
Submitted by
若小仟
-
4 months ago
2023-08-10 07:39
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
regex that allows digits, space and hyphen
PCRE2 (PHP >=7.3)
regex that allows digits, space and hyphen
Submitted by
Animesh
-
4 months ago
2023-08-10 08:47
1
...
5
6
7
8
9
10
11
...
123
Valid date (DD-MM-YYYY) from 1900 to 2099
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
Java 8
"
^
(
(
0
)*
[
1
-
9
]
|
1
[
012
]
|
3
[
01
]
)
-
(
(
0
)*
[
1
-
9
]
|
1
[
012
]
|
2
[
012
]
|
3
[
01
]
)
-
(
19
[
0
-
9
]
[
0
-
9
]
|
20
[
0
-
9
]
[
0
-
9
]
)
$
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
Nevix-Sama
-
9 months ago
2023-02-24 19:28