Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
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 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 12,160 community submitted regex patterns...
1
Validation - HTTP User Agent
PCRE2 (PHP >=7.3)
Validate only / non-capturing
Submitted by
razor velvet
-
9 days ago
1
RFC5322 email address validation (maybe FEWER STEPS !)
PCRE2 (PHP >=7.3)
validate email address according to RFC 5322 specification. I tried to optimize regex radically restructuring the original BNF-like specification with full support preserved.
Submitted by
hirunotuki
-
10 days ago
2
Test 1 solution
PCRE2 (PHP >=7.3)
thanks
Submitted by
Zeeble Dorp
-
11 days ago
1
Postcode validation
PCRE2 (PHP >=7.3)
I come across Dutch postcodes quite different from normal 5 or 6 digit postcodes. So, this regex covers most possible postcodes. Test cases: 1234 AB // Dutch postal code 12345 // Generic 5-digit postal code 380059 // Indian 6-digit postal code...
Submitted by
Pratik P
-
11 days ago
1
match all test directories
PCRE2 (PHP >=7.3)
s
Submitted by
anonymous
-
12 days ago
1
Fing GTM code in html
PCRE2 (PHP >=7.3)
This function extracts the Google Tag Manager (GTM) key from a given input string. The GTM key typically follows the format "GTM-XXXXXX", where "XXXXXX" represents a unique identifier.
Submitted by
kanapka94
-
12 days ago
1
Atlas MRN
PCRE2 (PHP >=7.3)
Im IT Zollverfahren Atlas werden die bisherigen Zollregistriernummern ATx Nummern durch MRN ersetzt. Der Aufbau der MRN erfolgt nach folgendem Schema: Stelle / Inhalt / zulässige Werte 1-2 / Jahr / 2 Integer (24 bis 99) 3-4 / Land / 2 Char (DE)...
Submitted by
Florian Ledeboer
-
12 days ago
1
regex match
PCRE2 (PHP >=7.3)
regex match on lastname and domain
Submitted by
anonymous
-
13 days ago
0
email matcher
PCRE2 (PHP >=7.3)
match some emails and extract their local part and domain
Submitted by
dang duomg 191
-
13 days ago
(Last modified 13 days ago)
1
Email Validation
.NET 7.0 (C#)
Basic email address validation example
Submitted by
Jeff Mills
-
13 days ago
1
Youtube id mathcer
PCRE2 (PHP >=7.3)
hehe
Submitted by
anonymous
-
14 days ago
1
unicode
PCRE2 (PHP >=7.3)
uncode word boundaries
Submitted by
Mehmet Kozan
-
19 days ago
1
haha regex
PCRE2 (PHP >=7.3)
haha funny regex min 3 char
Submitted by
Mehmet Kozan
-
19 days ago
(Last modified 18 days ago)
1
Malaysian Patronymic Separator
PCRE2 (PHP >=7.3)
This regular expression matches patronymic separators commonly used in Malaysian names such as: Bin Binti A/L or A\L A/P or A\P ...
Submitted by
alzhahir
-
20 days ago
(Last modified 12 days ago)
1
YouTube Video ID
Java 8
Gets the ID of a YouTube Video from any link to it.
Submitted by
cheeseburger
-
21 days ago
1
Find image html tags without alternative text
PCRE2 (PHP >=7.3)
This regex finds images html tags without alternative text
Submitted by
anonymous
-
21 days ago
1
Tac Tac Tic
PCRE2 (PHP >=7.3)
Only accepts a new `tic if there are two tac` before it.
Submitted by
@roshankumar350
-
22 days ago
2
Parse Excel CSV data
PCRE2 (PHP >=7.3)
This is the best regex I found that was able to correctly parse cells containing multiple lines (hard line breaks). Low number of steps with sufficient speed, and it doesn't require /x option either. Source: https://gist.github.com/awwsmm/886ac0ce0cef517ad7092915f708175f
Submitted by
thdoan
-
22 days ago
(Last modified 22 days ago)
2
Journalctl
PCRE2 (PHP >=7.3)
This was build on gentoo with english_ca.utf8 IIRC. Might not work for other distros... or locales supports -as the delimiter of hostname suffixing/prefixing
Submitted by
Wolf1098
-
22 days ago
1
Match all PHP function or method calls including inside the opening and closing curly braces/brackets
PCRE2 (PHP >=7.3)
Capture PHP Function/Class Methods Use regular expression to capture the whole method/function. Parse static PHP code for functions and class methods. Useful for getting tokens and possibly use to generate a Call-Graph for debugging.
Submitted by
chipgraphics#gmail.com
-
24 days ago
1
2
3
4
...
608
Looking for valid phone number
0
Regular Expression
Python
r"
(
\d
{1}
)
[
-
]
(
\d
{3}
)
[
-
]
(
\d
{3}
)
[
-
]
(
\d
{4}
)
"
gm
Open regex in editor
Description
This locates a valid phone number in a list of phone numbers
Submitted by
Dandaps
-
a year ago