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
Community Patterns
Search among 2,780 community submitted regex patterns...
2
Parse conventional commits message
PCRE2 (PHP >=7.3)
https://conventionalcommits.org Parses commits like type(scope)!: subject
Submitted by
Alex Kinnee
-
2 years ago
2
Email with gmail+ implementation
PCRE2 (PHP >=7.3)
Regex of email with ability to add gmail's +example system example: root email = user@gmail.com gmail+ = user+extra@gmail.com
Submitted by
brad
-
2 years ago
2
Palindromes
PCRE2 (PHP >=7.3)
Matches palindromes: arbitrary length ignores non-significant characters (spaces, ponctuation) ignores accents, provided the text is NFD-normalized recursive palindromes (e.g. "a été à"): either match the longest one ("a été à") or the nested ones individually ("a", "été", "à") (see comment)
Submitted by
NicolaF_
-
a year ago
(Last modified a year ago)
2
Remove extra/useless python elements for GPT input.
PCRE2 (PHP >=7.3)
This RegEx removes unused elements such as inline comments and blank lines in python code. This will save you tokens and time when using GPT-3+ or ChatGPT to help code and debug.
Submitted by
LukeL
-
a year ago
(Last modified a year ago)
2
IDN Domains and Subdomains
PCRE2 (PHP >=7.3)
IDN Domains & Normal Domains This regex is able to identify any type of domain or subdomain whether it is IDN or normal, this includes domains in emojis, non-Latin characters, etc.
Submitted by
NCK
-
9 months ago
2
Mikrotik firewall logs
Golang
Matching for mikrotik ROS 7 Used in promtail and grafana
Submitted by
anonymous
-
8 months ago
(Last modified 8 months ago)
2
regex101: RFC1918 Private IPv4 Addresses, but limited to matching /24 subnet host IDs
PCRE2 (PHP >=7.3)
POSIX ERE compatible, suitable for usage in Bash [ testing Attributions Derived from [regex101: RFC1918 - Private IPv4 addresses by 0100101101001.
Submitted by
anonymous
-
8 months ago
2
Check Email Validity
Java 8
Regular expression to check the email syntax validity. Certainly requires improvement, but it's a good basis to work from. Work with Java and JavaScript.
Submitted by
Alain TOMASIAN <alain.tomasian@kaptus.fr>
-
5 months ago
(Last modified 5 months ago)
2
Regex tutorial
Java 8
Case insensitive match the whole word betwween \bword\b
Submitted by
anonymous
-
4 years ago
(Last modified 9 months ago)
2
Task 4 Quiz
PCRE2 (PHP >=7.3)
It needs a major modification, since matching an integer is required. The accepted answer \d+ involves only "positive" integers. But -333 or +777 are also integers, which leads to two possible solutions with the last one being the most accurate: -?\d+ : The hyphen (optional minus sign) and a digit ...
Submitted by
seQuienSoy
-
2 years ago
2
Discord Username (old & new)
PCRE2 (PHP >=7.3)
Accomodate for Discord's username changeover and match against either the old username or the new username. But only one or the other. Match: CesarHvl#9000 cesarhvl cesar.hvl...
Submitted by
cesarhvl
-
10 months ago
1
Matching decimals in european format (dot as grouping separator, comma as decimal separator)
Java 8
A regex for validating decimal numbers in the European number format (in many parts of Europe at least, including Germany). A comma is used as a separator for the decimal number, a dot as a separator for thousand places.
Submitted by
Florian Drees
-
3 years ago
(Last modified 3 years ago)
1
Test expression
PCRE2 (PHP >=7.3)
To find at most 3 a in string
Submitted by
anonymous
-
3 years ago
1
PHP North American Phone Number
PCRE2 (PHP >=7.3)
Format phone numbers to look nice! E.g. 12345678900 --> +1(234)-567-8900 Matches with most ways numbers are stored 1.234.567.8900 1 234 567 8900...
Submitted by
Mendel Groner
-
3 years ago
1
Password - mot de passe
PCRE2 (PHP >=7.3)
1 caractère minuscule minimum 1 caractère majuscule minimum 1 chiffre minimum 1 caractère spécial minimum pas d'espace 8 caractères minimum en tout
Submitted by
Sofiane
-
2 years ago
1
get video id from youtube link
Golang
no description available
Submitted by
RyuaNerin
-
8 years ago
(Last modified 9 months ago)
1
Siebel Id
Golang
no description available
Submitted by
anonymous
-
7 years ago
1
Domain validation regex suitable for user input
Golang
This regexp can be used to validate domain names in Golang. While it cannot enforce the 253 character limit (with optional trailing period not included) that can be easily done by a simple len(domain) <= 253 check as well. This can be used as-is in other languages, even with RE2 regex engine. If po...
Submitted by
Alexander Dupuy
-
4 years ago
1
Word Wrap examples
PCRE2 (PHP >=7.3)
Four examples of word wrapping at the 80 character mark, each one taking fewer steps than the last. Comment and uncomment lines with # to see the difference between versions. Optimization discussions welcome!
Submitted by
OnlineCop
-
7 years ago
(Last modified 6 months ago)
1
Extract columns names from any select query
Golang
This regex can capture any column name from a select query. Be the original name, like are named on table, renamed with a reserved word AS or even without explicit AS. Go on, and test with your query ;)
Submitted by
Jefferson Gouveia
-
6 years ago
1
2
3
4
5
...
139
Mobile Number Regex
2
Regular Expression
PCRE2 (PHP >=7.3)
/
^
(
(?:
[
1
-
9
]
[
0
-
9
().-
]
{5,28}
[
0
-
9
]
)
|
(?:
(
00
|
0
)
(
){0,1}
[
1
-
9
]
[
0
-
9
().-
]
{3,26}
[
0
-
9
]
)
|
(?:
(
\+
)
(
){0,1}
[
1
-
9
]
[
0
-
9
().-
]
{4,27}
[
0
-
9
]
)
)
$
/
gm
Open regex in editor
Description
The following regex validates international mobile numbers
Submitted by
anonymous
-
3 years ago