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 18,000 community submitted regex patterns...
1
html tokenizer v1
PCRE2 (PHP >=7.3)
tokenizes your html (very buggy)
Submitted by
anonymous
-
18 hours ago
1
HTML PrimeNG (replace) empty opening and closing tags (into to self closed tags)
PCRE2 (PHP >=7.3)
This regular expresion matches opening and closing empty tags from PrimeNG library. This can be useful to replace it for self-closed tags which is available from Angular v15. Replacer: ``
Submitted by
https://sergiorey23.github.io/
-
3 days ago
(Last modified 2 days ago)
1
UUID v7 Matching
PCRE2 (PHP >=7.3)
UUID v7 Resources: https://uuid7.com/ https://uuid.ramsey.dev/en/stable/rfc4122/version7.html https://www.ietf.org/archive/id/draft-peabody-dispatch-new-uuid-format-04.html#name-uuid-version-7 ...
Submitted by
Regex by Ignacio del Corro / cxto21
-
5 days ago
(Last modified a day ago)
1
Words that are only sequences of Chemical Element Symbols, allowing smushes
PCRE2 (PHP >=7.3)
This will match only words that include chemical elements: H + Og + W + Ar + Ts but not Eton. It allows internal overlap: LaG = La + Ag, and allows the first letter or last letter to be the end/start of a symbol to allow chaining. You can easily remove the various pieces, though. A single-line (non...
Submitted by
mrflip
-
6 days ago
(Last modified 6 days ago)
1
Validate a comma separated list of IPv4 addresses, CIDRs, or IPv4 Ranges like 1.1.1.1-1.1.1.10
Golang
Simple Regex to *validate * (no extraction!) an IPv4 Range which can be a comma separated mixture of IPv4 addresses IPv4 CIDRs IPv4 Ranges like 1.1.1.1-1.1.1.10 Examples : ...
Submitted by
alucab
-
11 days ago
1
test
ECMAScript (JavaScript)
testing
Submitted by
madgregory
-
12 days ago
1
MobaXterm SSH session dump data
PCRE2 (PHP >=7.3)
Below regex pattern help to extract needful information from Portable export of SSH sessions. Although not complete, can help data extraction from export file.
Submitted by
anonymous
-
14 days ago
1
Russian phone number (российские номера телефонов)
PCRE2 (PHP >=7.3)
A regular expression for searching for phone numbers in the Russian format, taking into account different ways of writing the number, including spaces, brackets and dashes. Регулярное выражение для поиска номеров телефонов Российского формата. Учитывает написание номера через пробел, скобки, тире и ...
Submitted by
https://t.me/ds_ivanov
-
14 days ago
1
Factorization: Zero, Unit, Primes, or Composite?
.NET 7.0 (C#)
Description Inspects lines that contain only a character, let's say c, repeated n times. The name of the matching groups will tell you if n is 0, the unit 1, a prime number, or a composite number. Alternative ...
Submitted by
kevinhp
-
15 days ago
1
semver2.0.0_franenguix
Python
Given a version number MAJOR.MINOR.PATCH, increment the: MAJOR version when you make incompatible API changes. MINOR version when you add functionality in a backward compatible manner. PATCH version when you make backward compatible bug fixes. A pre-release version MAY be denoted by appending a hyp...
Submitted by
FranEnguix
-
15 days ago
(Last modified 15 days ago)
1
Match the web URL
PCRE2 (PHP >=7.3)
Match the web URL, like https://xxx.com or xxx.com, not matching the email or the ip address
Submitted by
Hughie
-
15 days ago
1
96 Bit Decryption
PCRE2 (PHP >=7.3)
Part 2 of my post.
Submitted by
Dave Cummins
-
17 days ago
1
96 Bit Encryption
PCRE2 (PHP >=7.3)
96 Bit encryption by using a library. Possible to extend this beyond 96 if you have the time! Look at my other post to see how to decrypt. Based on using a library of values.
Submitted by
Dave Cummins
-
17 days ago
1
Chemical equation one side
PCRE2 (PHP >=7.3)
Matches one side of a chemical equation. So for ` 2HCl + 2Na → 2NaCl + H2 ` it would match each side individually with one newline between each 2HCl + 2Na and 2NaCl + H2
Submitted by
viktorashi
-
19 days ago
1
Antimony CRN definition
PCRE2 (PHP >=7.3)
Describes how the first few lines of an Antimony (for Tellurium) CRN definition should look like
Submitted by
viktorashi
-
19 days ago
1
GPT multiline equations match
Python
substitutes \[...\] with $$...$$
Submitted by
MyAiTree
-
20 days ago
(Last modified 12 days ago)
1
ChatGPT Equations to MD equations
Python
Substitute the oneliner GPT equations \(..\) to tex like i.e. $..$
Submitted by
MyAITree
-
20 days ago
1
Trim Slashes
PCRE2 (PHP >=7.3)
Remove leading and trailing slashes
Submitted by
anonymous
-
a month ago
1
SELECT
PCRE2 (PHP >=7.3)
/^select\s+(?.+?)\s+from\s+(?\S+)\s*(?:where\s+(?[\d\w= ><!]+))?;?$/gmi
Submitted by
anonymous
-
a month ago
1
regex for mobile numbers
PCRE2 (PHP >=7.3)
regex to validate mobile numbers all over the world
Submitted by
anonymous
-
a month ago
1
2
3
...
900
Community Library Entry
0
Regular Expression
PCRE (PHP <7.3)
/
(
\b
|
^
)
(
[
А
-
Яа
-
яA
-
Za
-
z
]
{2,7}
\s
*
(
\(
.
{1,3}
\)
){0,1}
[
\s
-
]
+
[
А
-
Яа
-
яA
-
Za
-
z
]
*
)
\s
*
(
(
\d
{1,4}
[
-
\+\/
xXхХ
\*
]
[
\d
,
]
{1,4}
)+
\s
*
[
a
-
zA
-
Zа
-
яА
-
я
]
{0,3}
(
\(
.
{1,4}
\)
){0,1}
\+
*
){1,3}
-
*
[
\d
,
]
{0,4}
\s
*
[
A
-
Za
-
zА
-
Яа
-
я
\(\)
]
{0,4}
(
\b
|
$
)
/
g
Open regex in editor
Description
no description available
Submitted by
anonymous
-
7 years ago