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 community submitted regex patterns...
0/512
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
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
2
Regex Email Format
Created
·
2026-01-15 17:39
Updated
·
2026-01-16 23:26
Flavor
·
ECMAScript (JavaScript)
Used to check Email Format
Submitted by
Atipat Lorwongam
1
ตรวจสอบวรรณยุกต์และสระในภาษาไทย (รองรับการลากเสียงอาาาา)
Created
·
2026-01-15 17:20
Updated
·
2026-01-23 07:30
Flavor
·
ECMAScript (JavaScript)
ตรวจสอบการใช้วรรณยุกต์และสระในภาษาไทย รองรับการใช้สระอาาาาาติดกันแบบลากเสียง ไม่ตรวจสอบพยัญชนะต้นและตัวสะกด
Submitted by
อธิปัตย์ ล้อวงศ์งาม
1
ตรวจสอบวรรณยุกต์และสระในภาษาไทย
Created
·
2026-01-15 17:19
Updated
·
2026-01-23 07:29
Flavor
·
ECMAScript (JavaScript)
ใช้ตรวจสอบวรรณยุกต์และสระในภาษาไทย ไม่ตรวจสอบพยัญชนะต้นและตัวสะกด
Submitted by
อธิปัตย์ ล้อวงศ์งาม
1
Simple CSS Selector parser
Created
·
2025-12-31 14:18
Updated
·
2025-12-31 14:22
Flavor
·
ECMAScript (JavaScript)
Basic Regex for CSS Selector. Pseudo-Elements, Combinators and other advanced stuff are not supported.
Submitted by
anonymous
1
Text in between HTML tags and inside quotation marks within HTML tags
Created
·
2025-12-08 04:32
Flavor
·
ECMAScript (JavaScript)
Overview This Regular Expression shows any text between HTML tags or between quotation marks within the tags themselves. An example would be: <HTML lang="en", then selecting the 'en' from there. Group 1 is between tags, and group 2 is in the quotes. I recommend only using half of this regular expression, like the 'between tags' part, or the 'inside quotes part'. Explanation The whole regex is built of two alternates, the tags and quotes part. The tags part (the first part) starts with a lookbehind of a closing of a tag, then a lazy part that selects almost characters, and a lookahead that checks for the beginning of tag (so the text is between tags). The quotes part is built in a similar structure, where it looks behind for an open of a tag, .+ , then checking for an equals sign followed by a quotation mark. The middle section of the quotes part is again just searching for text, but also not including quotation marks. The lookahead checks for a closing quotation mark and that's it! Please comment any questions or email me.
Submitted by
daniel@sabian.pro
1
Universal HTML <input type="email"... requirement pattern
Created
·
2025-10-31 01:19
Flavor
·
ECMAScript (JavaScript)
This regex is a universal pattern used for the HTML input tag with type="email". Dont use type="email" as the pattern does not work with it. For the pattern to work correctly, use type="text" with inputmode="email" if you want to display the desired keyboard on mobile screens.
Submitted by
kiko
1
IPv4 no leading zeros
Created
·
2025-10-28 09:57
Flavor
·
ECMAScript (JavaScript)
An IPv4 expression that doesn't allow leading zeros in octets. 10.0.0.1 will pass 10.0.0.01 shouldn't pass
Submitted by
machfist
1
Only one special character("-") per word
Created
·
2025-09-20 18:27
Flavor
·
ECMAScript (JavaScript)
Only one special character ("-") is allowed when entering a word
Submitted by
anonymous
1
Email validation regex
Created
·
2025-09-05 11:27
Flavor
·
ECMAScript (JavaScript)
Compliant with RFC 5322
Submitted by
valentinllpz
1
Integer Number
Created
·
2025-08-17 13:59
Updated
·
2025-08-17 14:06
Flavor
·
ECMAScript (JavaScript)
X
Submitted by
Buddha
1
op
Created
·
2025-07-29 00:21
Flavor
·
ECMAScript (JavaScript)
les
Submitted by
anonymous
1
Detect age-related conversations.
Created
·
2025-07-21 08:50
Updated
·
2025-07-21 16:09
Flavor
·
ECMAScript (JavaScript)
Safety-measure protocol for online communities.
Submitted by
mable42
1
regex for '' deletion
Created
·
2025-07-16 16:44
Updated
·
2025-07-16 16:44
Flavor
·
ECMAScript (JavaScript)
regex for '' deletion
Submitted by
Egor K
1
Youtube URL / ID
Created
·
2025-05-24 02:20
Updated
·
2025-06-10 05:24
Flavor
·
ECMAScript (JavaScript)
Youtube match all URL / ID Note: Not work with rust lang if u want to use it in rust remove all the ' \ '. Regex link to watch update in the future and get data URL: https://regex101.com/r/lH4He5/
Submitted by
ccauvang
1
Regex to match URLs in a string
Created
·
2025-05-15 02:38
Flavor
·
ECMAScript (JavaScript)
Regex to match URLs in a string with http and https protocol and optional paths in URL
Submitted by
Kaustubh
1
https://google.com
Created
·
2025-04-27 00:18
Flavor
·
ECMAScript (JavaScript)
PropTypes.string# ``
Submitted by
Khaliq88
2
BCP 47, RFC 5646, Tags for Identifying Languages
Created
·
2025-04-07 17:39
Flavor
·
ECMAScript (JavaScript)
BCP 47, RFC 5646, Tags for Identifying Languages Phillips, A., Ed., and M. Davis, Ed., "Tags for Identifying Languages", BCP 47, RFC 5646, DOI 10.17487/RFC5646, September 2009, .
Submitted by
anonymous
1
Deped LRN validator
Created
·
2025-04-07 13:07
Flavor
·
ECMAScript (JavaScript)
This regex will validate a Deped's student's learner reference number (LRN) based from: https://www.teacherph.com/deped-learner-reference-number-lrn/
Submitted by
anonymous
1
gdpsfh anti-stupid
Created
·
2025-04-05 05:32
Flavor
·
ECMAScript (JavaScript)
(refer to forum post 1357770511563624621) gdpsfh anti-stupid, matches correct gdps name if incorrect format https://mygdps.ps.fhgdps.com => mygdps http://mygdps.ps.fhgdps.com => mygdps https://mygdpsaaaaaaaaaaaa.ps.fhgdps.com => (no match because incorrect subdomain) correctinput => (no match)
Submitted by
anonymous
1
Bangla validation regex
Created
·
2025-03-26 08:35
Flavor
·
ECMAScript (JavaScript)
আপনার কোডের Bangla validation regex শুধুমাত্র বাংলা ইউনিকোড রেঞ্জ (\u0980-\u09FF) অনুমোদন করছে। কিন্তু, "জোবায়দুল ইসলাম"-এর মধ্যে স্পেস ( ) রয়েছে, যা আপনার regex-এ অনুমোদিত নয়।** আপনার regex-টি নিচের মতো পরিবর্তন করুন, যাতে স্পেস এবং বাংলা চরিত্র উভয়ই গ্রহণযোগ্য হয়: const isBanglaText = (text: string) => { const banglaRegex = /^[\u0980-\u09FF\s]+$/; // বাংলা অক্ষর + স্পেস অনুমোদিত return banglaRegex.test(text); }; এখন "জোবায়দুল ইসলাম" এবং অন্যান্য বাংলা নাম কোনো সমস্যা ছাড়াই গ্রহণ করবে। 🚀
Submitted by
Zobaidul Kazi
2
AWS Cognito Default Password Policy
Created
·
2025-03-05 13:13
Updated
·
2025-03-05 13:32
Flavor
·
ECMAScript (JavaScript)
Password requirements Contains at least 1 number Contains at least 1 special character Contains at least 1 uppercase letter Contains at least 1 lowercase letter It follows AWS in allowing white-space.
Submitted by
danieldspx
1
Jina AI tokenizer
Created
·
2025-03-05 07:59
Flavor
·
ECMAScript (JavaScript)
Source: X, Github
Submitted by
anonymous
1
argocd-vault-plugin
Created
·
2025-02-14 15:39
Flavor
·
ECMAScript (JavaScript)
env: name: AVP_VERSION value: 1.18.0
Submitted by
Yevhen Kolomeiko (Sad-Soul-Eater)
1
OGC Date-time parameter regex validator
Created
·
2025-02-11 08:03
Flavor
·
ECMAScript (JavaScript)
Many spatiotemporal OGC services use the datetime parameter to filter spatiotemporal collections. The recommended way to structure the datetime parameter is interval-closed = date-time "/" date-time interval-open-start = "../" date-time interval-open-end = date-time "/.." interval = interval-closed / interval-open-start / interval-open- end datetime = date-time / interval
Submitted by
murithigeo
2
Google Analytics 4 Ecommerce Events
Created
·
2025-02-10 13:09
Flavor
·
ECMAScript (JavaScript)
gets all GA4 Ecommerce Events
Submitted by
Lukas Grebe
1
Match camelCase file names. Allows numbers and [], [[]] as first chars.
Created
·
2025-02-06 10:38
Updated
·
2025-02-06 11:00
Flavor
·
ECMAScript (JavaScript)
This regex is used to match file names with camelCase names only. It allows numbers and [...], [[...]] as first characters.
Submitted by
Florent Catiau-Tristant
1
Patu
Created
·
2025-02-04 08:59
Flavor
·
ECMAScript (JavaScript)
"^(http://|https://|http://www\.|https://www\.|www\.)?(www\.(twanda))?(([\w\-]+)?\.?(twanda|))(\.ch|\.com)(:\d+)?/.+$"igm
Submitted by
anonymous
1
Instagram Profile URL
Created
·
2025-01-21 11:46
Flavor
·
ECMAScript (JavaScript)
ECMAScript for Instagram Profile URL
Submitted by
chiminori
2
Telegram URL
Created
·
2025-01-21 10:58
Updated
·
2025-01-21 11:04
Flavor
·
ECMAScript (JavaScript)
I had to check for myself, but I thought, suddenly someone also come to someone later =)
Submitted by
chiminori
1
YYMMDD Date with leap year
Created
·
2025-01-08 17:28
Updated
·
2025-02-24 07:37
Flavor
·
ECMAScript (JavaScript)
This expression validates any YYMMDD date, and insures that the leap year is accounted for. This is valid till 2099, 2100 is NOT a leap year.
Submitted by
M. Fahmy
1
Object Value JavaScript
Created
·
2025-01-01 13:57
Updated
·
2025-01-01 14:16
Flavor
·
ECMAScript (JavaScript)
Get object values in javascript. Get results with "$1". Example: myObject.replace(/"(.*?)"/g, "$1")
Submitted by
zazer
1
Extract & Parse URLs (Dec. 2024)
Created
·
2024-12-30 07:10
Flavor
·
ECMAScript (JavaScript)
This version has a very high accuracy - few extraneous char matches. Very verbose, heavy usage of look-aheads, look-behinds, and mostly 'inclusive' character class matching. (as opposed to the exclusion strategy in this example)
Submitted by
DanLevy.net
1
Quality Value, RFC 9110 HTTP Semantics.
Created
·
2024-12-20 19:40
Updated
·
2026-01-06 22:24
Flavor
·
ECMAScript (JavaScript)
To extract the Quality Value (qvalue) according the RFC 9110 HTTP Semantics specifications from the weight of HTTP headers elements, like: Accept-Language Accept Accept-Charset Accept-Encoding TE weight = OWS ";" OWS "q=" qvalue qvalue = ( "0" [ "." 0*3DIGIT ] ) / ( "1" [ "." 0*3("0") ] )
Submitted by
Daniel D'Leon
1
[React TypeScript] Unnecessary brackets around strings
Created
·
2024-12-20 13:06
Updated
·
2025-02-17 08:18
Flavor
·
ECMAScript (JavaScript)
Matches string properties that unnecessarily use brackets in React components. NOTE: If you're looking to harmonise your quote usage, use this substitution input: $1"$3$4" But be aware that strings that use single quotes inside double quotes or vice-versa will break!!!
Submitted by
Nathanthanthan
1
[React TypeScript] Unnecessary backticks
Created
·
2024-12-20 12:55
Updated
·
2025-02-17 08:18
Flavor
·
ECMAScript (JavaScript)
Matches string properties that unnecessarily use backticks in React components. NOTE: This regex ignoes backtick strings that contain BOTH quotes (") AND single quotes (') but it WILL match backtick strings with ONLY quotes or ONLY single quotes! Keep this in mind if you want to use substitution! For example, if the string is: `prop={String with ONLY "quotes" and NO single quotes}` Then the regex will match these capture groups: $1 -> prop= $2 -> String with ONLY "quotes" and NO single quotes So if you use substitution with this input: $1"$2" You will get: prop="String with ONLY "quotes" and NO single quotes" Which will give you an error!!!
Submitted by
Nathanthanthan
1
Hexadecimal
Created
·
2024-12-16 13:24
Flavor
·
ECMAScript (JavaScript)
Only matches if the entire string is in hexadecimal format
Submitted by
anonymous
1
js-br
Created
·
2024-12-13 10:01
Flavor
·
ECMAScript (JavaScript)
teste
Submitted by
anonymous
1
prevent double zeros
Created
·
2024-12-11 07:41
Flavor
·
ECMAScript (JavaScript)
prvent double zeros also decimals
Submitted by
bilal
1
OBprefix
Created
·
2024-12-10 13:16
Updated
·
2024-12-10 13:44
Flavor
·
ECMAScript (JavaScript)
Frequently-used prefix regex expressions without quote form in Obsidian plugins.
Submitted by
anonymous
1
quote-OBprefix
Created
·
2024-12-10 13:10
Updated
·
2024-12-10 13:43
Flavor
·
ECMAScript (JavaScript)
Frequently-used prefix regex expressions with quote form in Obsidian plugins.
Submitted by
YaoYYoung
1
Canadian Postal Code Validation
Created
·
2024-11-28 18:47
Updated
·
2024-11-28 18:50
Flavor
·
ECMAScript (JavaScript)
Postal code format validation based on Canada Post Addressing Guidelines Accepts optional space or hyphens
Submitted by
usrrname
1
Regex for Matching Documentation Websites
Created
·
2024-11-24 01:45
Flavor
·
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 ^.(?:\.|\/)(docs|documentation|help|guide|manual|reference|api|kb|support|resources|wiki|developer|how-to|tutorials|examples|learn|instructions)(?:\.|\/)?.$ Purpose This regex is intended to identify URLs that contain keywords associated with documentation or support websites. It handles common patterns in subdomains, directories, and file paths. Explanation ^.*: Matches any characters at the beginning of the URL (any prefix). (?:\.|\/): Matches either a period (.) or a forward slash (/) preceding the keyword. (docs|documentation|help|guide|manual|...): Matches any of the keywords listed in the group. (?:\.|\/)?: Allows an optional period (.) or forward slash (/) following the keyword. .*$: Matches any characters following the keyword (any suffix). Examples Positive Examples The following URLs should match the regex: https://example.com/docs http://docs.example.com https://example.com/documentation https://sub.domain.com/docs/index.html https://example.com/help https://api.example.com/docs http://example.com/manual/index.html https://wiki.example.com http://developer.example.com/guide https://example.com/tutorials/docs/page https://kb.example.com/docs/tutorial.html https://example.com/resources/documentation/tutorial.html http://example.com/reference/help/documentation.html https://developer.example.com/docs/tutorials/index.html http://support.example.com/documentation/overview https://resources.example.com/docs/v1/tutorial https://example.com/how-to/documentation http://example.com/api/reference/docs https://example.com/reference/v2/index.html http://example.com/docs/resources/api.html Negative Examples The following URLs should not match the regex: https://example.com/documentary http://helpful.example.com https://manuals.example.com http://example.com/references https://example.com/resourceful http://example.com/wiki-books https://apiary.example.com http://example.com/documents http://example.com/documentable https://help-center.example.com http://manual.example.com/docsystem https://example.com/resourcesful http://api.example.comary https://example.net/instructions-v1 http://example.org/learned-tutorial http://example.com/support-center Author Jeremy Georges-Filteau Website Github
Submitted by
jgeofil
1
Any Unicode dash or its HTML escaped version
Created
·
2024-11-20 01:41
Updated
·
2024-11-20 01:51
Flavor
·
ECMAScript (JavaScript)
Match any of the weird dashes people figure out how to put in their data
Submitted by
anonymous
1
test
Created
·
2024-11-02 23:33
Flavor
·
ECMAScript (JavaScript)
testing
Submitted by
madgregory
1
Credit Cart Prediction & Validation
Created
·
2024-10-14 20:03
Updated
·
2024-10-16 18:23
Flavor
·
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
1
Search for markup elements with an attribute
Created
·
2024-10-04 19:20
Flavor
·
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
1
short IPV4 Capture
Created
·
2024-09-30 16:52
Flavor
·
ECMAScript (JavaScript)
(?(?:(?:250-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
Load More
Community Library Entry
0
Regular Expression
Created
·
2017-08-19 15:07
Flavor
·
ECMAScript (JavaScript)
/
(?:
A
|
B
|
C
|
D
|
E
|
1
\)
|
2
\)
|
3
\)
|
4
\)
|
5
\)
){0,1}(?:
\:
|
\.
|
\
){0,1}
[^
0
-
9
]
{0,2}
(
(?:
[
\d
]
{1,2}
[
\s
|
\+
]
{1}
){0,4}
[
\d
]
{1,2}
)
[
\s
]
{0,1}
\*
[
\s
]
{0,1}
(
(?:
[
\d
]
{1,2}
\+
[
\s
]
{0,2}
){0,98}
[
\d
]
{1,2}
)(?!
[
\+
|
\-
|
\d
]
)
[
\s
]
{1,3}
(
(?:
[
\d
]
{1,2}
\+
){0,98}
[
\d
]
{1,2}
)
/
g
Open regex in editor
Description
no description available
Submitted by
anonymous