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 3,860 community submitted regex patterns...
1
short IPV4 Capture
ECMAScript (JavaScript)
(?(?:(?:25[0-5]|(?:2[0-4]|1\d|[1-9]|)\d)\.?\b){4}) Originating from ^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$ at only 43 chars Source: Danail Gabenski
Submitted by
0xp
-
2 months ago
1
Search for markup elements with an attribute
ECMAScript (JavaScript)
In this example we are searching for all element/component in JSX that have the is="secondary" prop. This regex was tested with VS Code
Submitted by
anonymous
-
2 months ago
1
Slash Separated Numbers
Golang
...
Submitted by
Anonymous
-
2 months ago
1
ISO 8601 DURATION - Terraform Validation
Golang
This is made to validate an ISO 8601 input in a Terraform variable validation block: validation { condition = can(regex("^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$", var.value)) error_message = "The value must be a valid ISO 8601 duration string representing time. (e.g. PT...
Submitted by
anonymous
-
2 months ago
1
Credit Cart Prediction & Validation
ECMAScript (JavaScript)
Credit Card Carrier Prediction This regex is specifically designed to predict from the first few characters which carrier type the credit card number is.
Submitted by
anonymous
-
2 months ago
(Last modified 2 months ago)
1
test
ECMAScript (JavaScript)
testing
Submitted by
madgregory
-
a month 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
-
a month ago
1
Any Unicode dash or its HTML escaped version
ECMAScript (JavaScript)
Match any of the weird dashes people figure out how to put in their data
Submitted by
anonymous
-
15 days ago
(Last modified 15 days ago)
1
Regex for Matching Documentation Websites
ECMAScript (JavaScript)
Regex for Matching Documentation Websites This repository contains a powerful regular expression designed to match URLs that commonly point to documentation-related websites. The regex is optimized for flexibility, covering various terms and URL patterns. Regex Pattern ...
Submitted by
jgeofil
-
11 days ago
1
Canadian Postal Code Validation
ECMAScript (JavaScript)
Postal code format validation based on Canada Post Addressing Guidelines Accepts optional space or hyphens
Submitted by
usrrname
-
6 days ago
(Last modified 6 days ago)
1
AOC 2024 D3 regex
Rust
The regex to be used in both parts of adventofcode.com 2024 day 3 puzzle
Submitted by
dragmine149
-
2 days ago
1
advent of code 2024 day3
Golang
regex of challenge
Submitted by
Marcell Martini
-
a day ago
(Last modified an hour ago)
2
Error in Refex
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
11 years ago
2
sample
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
11 years ago
2
US Postal Code
ECMAScript (JavaScript)
refactor
Submitted by
jay johnson
-
11 years ago
2
US and Canada Regex
ECMAScript (JavaScript)
A zipcode regex for validation of both US and Canada
Submitted by
Kyle M.
-
11 years ago
2
Find 'console.' but not 'console.log'
ECMAScript (JavaScript)
no description available
Submitted by
Jay Johnson
-
11 years ago
2
Replace \n by <br />
ECMAScript (JavaScript)
Replace non-ending string \n by the HTML tag
Submitted by
anonymous
-
11 years ago
2
Punto antes de ¿ o ¡
ECMAScript (JavaScript)
Corregir la falta de punto cuando se abre un signo de exclamación o interrogación para el idioma español.
Submitted by
paconaranjo
-
11 years ago
2
trim string
ECMAScript (JavaScript)
trim leading and trailing whitespace from a string
Submitted by
Dave Atchley
-
11 years ago
1
...
178
179
180
181
182
...
193
Community Library Entry
3
Regular Expression
Golang
`
(?i)
^
(?:
(
[
a
-
z0
-
9-
]
+
|
\*
)
\.
)?
(
[
a
-
z0
-
9-
]
{1,61}
)
\.
(
[
a
-
z0
-
9
]
{2,7}
)
$
`
gm
Open regex in editor
Description
Validates subdomain, root domain, and wild card domains
Submitted by
AnonymousDapper
-
8 years ago