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
Most upvotes
Most downvotes
Highest Score
Lowest Score
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 9,740 community submitted regex patterns...
1
11
Java 8
11
Submitted by
11
-
3 years ago
0
Regex for only alphabets
PCRE (PHP <7.3)
Regex for only alphabets
Submitted by
anonymous
-
3 years ago
0
Ngay thang nam
PCRE (PHP <7.3)
Bat ngay thang nam
Submitted by
anonymous
-
3 years ago
0
password validation
PCRE (PHP <7.3)
(?=.[A-Za-z])(?=.\d)[A-Za-z\d]{8,}
Submitted by
anonymous
-
3 years ago
0
Password Simple
PCRE (PHP <7.3)
Password regex not allowed space
Submitted by
anonymous
-
3 years ago
0
Name account
PCRE (PHP <7.3)
Regex for accounts names without space
Submitted by
anonymous
-
3 years ago
0
Full name with accented letters
PCRE (PHP <7.3)
Accept full name with white space, hyphen, dot, apostrophe, small letters, large letters, accented letters
Submitted by
anonymous
-
3 years ago
1
Match Windows filename in any path but only C: D: and F: drives
Java 8
Used for Service Discovery in vRealize Operations. Use case is a service that can be installed on any path, but we only want to discover and monitor services installed on standard production drives (C, D or F). Filename will always be the same.
Submitted by
Various
-
3 years ago
0
Ssi
PCRE (PHP <7.3)
alphabetically Scripted
Submitted by
MGB
-
3 years ago
0
URL trailing slash check
PCRE (PHP <7.3)
This determines if URL has trailing slash
Submitted by
randywolf244
-
3 years ago
0
Capture Groups with back references
PCRE (PHP <7.3)
Extracting the variable names, e.g. (DOB_TT, OSTATE, etc) by setting up capture groups and extracting the 5th capture group
Submitted by
anonymous
-
3 years ago
0
Grabbing inside quotes for Google Sheets
PCRE (PHP <7.3)
Sheets treats quote marks weird since that's a character used in formulas. This is the remedy for that. It does not work in the editor. This only works in Google Sheets
Submitted by
randywolf244
-
3 years ago
0
Extract root domain from URL
PCRE (PHP <7.3)
It will extract the root domain from any URL. This includes removing subdomains, www. and the slug.
Submitted by
randywolf244
-
3 years ago
0
Email Validation Pattern
Java 8
Email Validation Pattern
Submitted by
Aslam Anver
-
3 years ago
1
SQL comments Big Query
Golang
SQL comments on Big Query
Submitted by
anonymous
-
3 years ago
1
IP Address Validation Express
PCRE (PHP <7.3)
This is an accurate IP Address validation express that matches 1.1.1.1 to 255.255.255.255. Enjoy the code and pass it on to someone else in need. _"With practice you have no choice but to improve." "A logical mind has no limits to understanding."_
Submitted by
anonymous
-
3 years ago
0
Smartling custom placeholders and liquid strategy
Java 8
Suggested Smartling custom placeholder regex to support liquid syntax as documented for Braze. Because default value cannot be extracted easily recommend rewrting the liquite to avoid using default filters.
Submitted by
Eric Negron
-
3 years ago
1
Remove single, but not repeating newlines, except immediately after a period. (xiTWA2/1)
PCRE (PHP <7.3)
Intended as a first pass on already word wrapped text, to remove wrap newlines while preserving likely intentional ones. Not especially robust.
Submitted by
Tristan
-
3 years ago
1
Word wrap text
PCRE (PHP <7.3)
(Directly inspired by https://macromates.com/blog/2006/wrapping-text-with-regular-expressions/ ) This version only splits between words, so lines may wrap earlier than the given maximum. Passes existing linefeed through "as‐is", so probably not useful for reflowing already wrapped text
Submitted by
Tristan
-
3 years ago
0
Add string after matching 1st occurence, every line
Golang
Regex adding a string (here vs_) after 1st matching occurence (of reflectance_\d_).
Submitted by
Nikos Alexandris
-
3 years ago
1
...
26
27
28
29
30
...
487
Community Library Entry
2
Regular Expression
.NET 7.0 (C#)
@"
^
(?<code>
\+
?
\d
{1,3}
)
[
-
\s
]
{0,}
(?<number>
\(
?
\d
{3}
\)
?
[
-
\s
]
{0,}
\d
{3}
[
-
\s
]
{0,}
\d
{2}
[
-
\s
]
{0,}
\d
{2}
)
$
"
gm
Open regex in editor
Description
Phone number for all countries. Valid symbols: ( ), -, whitespace
Submitted by
Alexander Smirnov
-
2 years ago