Please enable JavaScript to use regex101
Regular
Expressions
101
Support Regex101
Social
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)
ECMAScript (JavaScript)
Python
Golang
Java
.NET 7.0 (C#)
Rust
PCRE (Legacy)
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 18,300 community submitted regex patterns...
1
Validate an IP
Created
·
2026-02-25 11:06
Updated
·
2026-02-25 11:11
Flavor
·
PCRE2 (PHP)
52 character long regex to validate IP address.
Submitted by
Karthik
1
number selector, with commas & decimals
Created
·
2026-02-12 05:04
Flavor
·
PCRE2 (PHP)
selects numbers, with commas and decimals, like 1,234.56
Submitted by
Bicorn
1
Smart outer parentheses selector with backslash escaping
Created
·
2026-02-10 03:26
Updated
·
2026-02-12 01:11
Flavor
·
PCRE2 (PHP)
Grabs the outer parentheses and contents taking into account inner parentheses enclosures
Submitted by
bicorn
1
nexus/sonartype composer cleanup of unfinished package versions
Created
·
2026-02-05 13:05
Flavor
·
PCRE2 (PHP)
matches composer packages with -alpha, -beta and -rc versionings
Submitted by
Anna Damm
1
OmegaT Project Name (Pattern)
Created
·
2026-02-03 16:49
Flavor
·
PCRE2 (PHP)
Regex showing how to match the five parts in an OmegaT project name (named as per the internal convention at cApStAn), including labels for each captured group (each part in the name).
Submitted by
msoutopico
2
Validate color with grb group
Created
·
2026-02-03 03:22
Updated
·
2026-02-04 03:36
Flavor
·
Golang
match: #aabbcc #abc (255,255,255) (255,255,255,255) 255,255,255 no match: #gggggg #ggg 256,256,256
Submitted by
Doyoung
1
unnecessary closing HTML tags
Created
·
2026-01-27 19:15
Flavor
·
PCRE2 (PHP)
Selects the ` and ` tags from a string. You can probably do this with something easier, but this works
Submitted by
Twineee
1
Door_Double
Created
·
2026-01-27 07:54
Updated
·
2026-01-28 10:27
Flavor
·
Python
Regex for Door_Double
Submitted by
anonymous
1
ตรวจสอบพยัญชนะต้นตัวสะกดสระและวรรณยุกต์ไทย
Created
·
2026-01-22 01:36
Updated
·
2026-01-23 12:42
Flavor
·
ECMAScript (JavaScript)
ตรวจสอบพยัญชนะต้น (ต้องมี) ตรวจตัวสะกดสำหรับสระที่ต้องมี ตรวจสอบการวางสระและวรรณยุกต์ไทย หมายเหตุ การตรวจสอบตัวสะกดในภาษาไทยตรวจสอบได้ยากเพราะภาษาไทยเป็นภาษาที่เขียนติด ๆ กันไม่มีการแบ่งคำอย่างชัดเจนทำให้การอ่านภาษาไทยผู้อ่านต้องใช้ความหมายของคำในการตัดสินการอ่านแบ่งคำตามความเหมาะสมเช่นคำว่า "ตากลม" อาจอ่านเป็น "ตาก-ลม" ก็ได้ หรืออ่านเป็น "ตา-กลม"ก็ได้ ดังนั้นการเขียน Regex เพื่อทำการตรวจสอบอาจช่วยได้ระดับหนึ่ง อ่าจมีผิดบ้างถูกบ้าง แต่ก็ถือว่าเป็นเครื่องมือที่ใช้ช่วยเหลือในการตรวจสอบเพิ่มเติมได้ 80% ของความเป็นไปใด้ก็แล้วกันนะครับ หวังว่าการเขียนเพิ่มเติมส่วนนี้ จะมีประโยชน์บ้างไม่มากก็น้อย
Submitted by
อธิปัตย์ ล้อวงศ์งาม
2
Secure Email Validation (OWASP-Aligned & DNS-Strict) (RFC 5322)
Created
·
2026-01-21 16:32
Updated
·
2026-01-21 16:36
Flavor
·
ECMAScript (JavaScript)
This regular expression provides a balance between RFC compliance and security-best-practices. It is designed to prevent injection vectors in legacy systems by using a restricted "safe" character subset recommended by the OWASP Validation Regex Repository. Pattern: ^A-Za-z0-9(?:\.A-Za-z0-9_+&-]+)*@(?:[A-Za-z0-9{0,61}[A-Za-z0-9])?\.)+[A-Za-z]{2,63}$ Key Features: Forced Alphanumeric Start: Prevents leading hyphens to avoid command injection vulnerabilities. Security Subset: Restricts special characters to _+&*- to prevent exotic character injections (e.g., pipes or backticks). No Quoted Strings: Forbids quoted strings to eliminate dangerous payloads containing spaces or backslashes. DNS Compliance: Enforces label lengths (1–63 characters) and prevents labels from starting or ending with hyphens. Whole String Anchoring: Uses ^ and $ to ensure the entire input is validated.
Submitted by
Gor Sargsyan
1
Laravel Log (MonoLog) Print
Created
·
2026-01-21 14:51
Updated
·
2026-01-21 15:00
Flavor
·
PCRE2 (PHP)
Extracts the following fields from a Laravel Log print: Time Stamp (Date) Log Level (supports optional prefix (ie. local.DEBUG)) Log Message Exception | Context If an exception is detected, the file reference (file path + line number), and optional stacktrace are captured.
Submitted by
Jerren
1
Poland PESEL
Created
·
2026-01-21 11:23
Flavor
·
PCRE2 (PHP)
Correct Poland PESEL base regex validator. Covers birth dates up to 2099 year. PESEL numbers are in YYMMDDXXXXX format, however, the month is adjusted based on what year people were born. People born from 1900-1999 has no adjustment, 2000-2099 is the month +20, 2100-2199 is +40, 2200-2299 is +60. For example, if someone was born December 16, 2016, their PESEL would be 163216XXXXX.
Submitted by
@Sldmk
1
PLF4 Formular mit Komponente
Created
·
2026-01-21 07:52
Flavor
·
PCRE2 (PHP)
PLF4
Submitted by
anonymous
1
PLF3
Created
·
2026-01-21 07:38
Flavor
·
PCRE2 (PHP)
PLF3
Submitted by
anonym
1
PLF2
Created
·
2026-01-21 07:22
Flavor
·
PCRE2 (PHP)
PLF2
Submitted by
anonym
1
PLF1
Created
·
2026-01-21 07:20
Flavor
·
PCRE2 (PHP)
plf1
Submitted by
anonym
1
Wasser
Created
·
2026-01-20 20:24
Flavor
·
PCRE2 (PHP)
hey das ist richtig coool oder?
Submitted by
anonymous
1
Python -- Match container image reference parts
Created
·
2026-01-20 02:14
Updated
·
2026-01-20 02:28
Flavor
·
Python
This is a Python RE for matching different parts and combinations of various docker/container image references, as compatible with docker pull etc. Parts / Capture Groups image: # whole image repo: # everything but the tag/digest registry: # host+port host: port: name: # path within registry reference: # tag or digest (with : or @; I haven't bothered to figure out how to strip that yet) tag: digest: If it matches, it should match image, repo, and name at the very least.
Submitted by
neal-ian
1
Check valid URI Scheme according to RFC2396
Created
·
2026-01-17 07:52
Flavor
·
Golang
Simple prefix matcher for validating URI Schemes according to [RFC2396, Section 3.1]( http://www.faqs.org/rfcs/rfc2396.html#3.5:~:text=well%20as%20%22http%22%29.-,scheme%20%20%20%20%20%20%20%20%3D%20alpha%20*%28%20alpha%20%7C%20digit%20%7C%20%22%2B%22%20%7C%20%22%2D%22%20%7C%20%22.%22%20%29,-Relative%20URI%20references) Go Playground: https://go.dev/play/p/vtYEugsNAfo
Submitted by
Gwyneth Llewelyn
1
URL, URI format validation
Created
·
2026-01-16 16:16
Updated
·
2026-01-16 23:25
Flavor
·
ECMAScript (JavaScript)
URL, URI format validation
Submitted by
Atipat Lorwongam
Previous page
1
2
3
…
915
Next page
Community Library Entry
0
Regular Expression
Created
·
2019-08-12 13:33
Flavor
·
Python
r"
(
[
B,L
]
C
[
1,2,3
]
-C
[
5,6,7
][
A,E
]
0
[
1,2,4
]
-
\d\d\d
)
|
(
[
B,L
]
C
[
1,2,3
]
-C
[
5,6,7
]
0
[
1,2,4
]
-
\d\d\d
)
|
(
[
B,L
]
C
[
1,2,3
]
-C
[
5,6,7
]
E
[
1,2,5
][
0,5
]
)
|
(
LC3-C5E100
)
"
gm
Open regex in editor
Description
no description available
Submitted by
anonymous