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
12
Conventional Commits validation
Created
·
2022-01-03 20:30
Updated
·
2022-04-05 20:20
Flavor
·
Python
This regex prevents the writing of non-standard conventional commits. I'm available on my github
Submitted by
Krisque
12
Find Reddit Threads
Created
·
2015-03-12 09:23
Flavor
·
Python
Simply searches for the thread-id in any kind of valid reddit-URL.
Submitted by
Mio
11
extract subdomain(if available) or domain from URL
Created
·
2016-04-08 13:05
Flavor
·
Python
This regex should extract the subdomain, if any, or the domain, if no subdomain is used, from an arbitrary URL
Submitted by
trevi@twanda.com
6
Find and extract email domain
Created
·
2016-04-03 17:03
Flavor
·
Python
Find and extract email domain. Ex: test@example.pt -> extract 'example.pt'
Submitted by
Fnxk
10
entity
Created
·
2015-11-20 01:12
Flavor
·
Python
no description available
Submitted by
anonymous
83
Distinguish torrent files (series vs movies)
Created
·
2014-06-26 09:59
Updated
·
2023-07-20 15:08
Flavor
·
Python
A neat regex for finding out whether a given torrent name is a series or a movie. Returns the full name of the series with the separator needed to make it pretty (ie, replace it with space or what you want). Also returns the season number or the year for the movie/series, depending on what was previously matched.
Submitted by
Firas Dib
5
C# Regex Extract/Match Nested HTML Elements/Tags
Created
·
2022-03-03 19:13
Updated
·
2023-08-01 07:26
Flavor
·
.NET 7.0 (C#)
With this C# regex, you can easily match/Parse Nested HTML tags. Example input: someTitle SomeHeader anotherHeader HelloWorld Output: anotherHeader HelloWorld string pattern = $@"{ startP }((?'nested'{ openP })|{ closeP }(?'-nested')|\w\W]?){ closeP }"; *'StartP' (Must include open tag), example: <div id="target" *'openP' example: <div *'closeP' example: </div References: [In Depth with RegEx Matching Nested Constructions In Depth with .NET RegEx Balanced Grouping Regular expression matches closed HTML tags (nesting is supported)
Submitted by
w4po
5
Match Only Text
Created
·
2016-07-05 03:56
Flavor
·
Python
no description available
Submitted by
anonymous
5
psswd
Created
·
2016-03-24 09:04
Flavor
·
Python
no description available
Submitted by
anonymous
5
Form Tag
Created
·
2016-02-26 06:49
Flavor
·
Python
Form Tag
Submitted by
Jay Patel
5
import url image
Created
·
2015-12-18 08:44
Flavor
·
Python
import url image
Submitted by
bartimeys
7
IOS3166 Country Code Identification REGEX
Created
·
2015-06-07 04:48
Flavor
·
Python
IOS3166 Country Code Identification REGEX
Submitted by
theitgeek@recu.org.uk
7
SO: fail2ban regular to find 403 request in nginx
Created
·
2014-09-15 11:32
Updated
·
2023-07-27 20:59
Flavor
·
Python
http://stackoverflow.com/q/25778420/2072035
Submitted by
anonymous
9
English date in "dd mmmm yyyy" format
Created
·
2015-05-18 19:41
Flavor
·
Python
Parse an English date following the "dd mmmm yyyy" format.
Submitted by
Tantale
4
Equation matching (without equal)
Created
·
2015-07-01 19:50
Flavor
·
Python
use this to get value of any side of an equation. You can combine this with https://regex101.com/r/fH5kJ1/1
Submitted by
Kerosene2000
8
repeat group match
Created
·
2015-07-24 21:02
Flavor
·
Python
no description available
Submitted by
anonymous
9
domain - host
Created
·
2015-09-29 17:50
Flavor
·
Python
no description available
Submitted by
anonymous
9
Extract Protocol, URL, URL Path, get parameters and hash from URI
Created
·
2014-05-22 23:34
Flavor
·
Python
This is simplified from my last submission.
Submitted by
Dale O'Brien
3
Placeholder resolving
Created
·
2023-10-07 19:39
Flavor
·
.NET 7.0 (C#)
.Net regular expression for resolving placeholders in the format of ${rewriter(multilevel:key)?fallback} (+ variations)
Submitted by
anonymous
3
Caltrans EA validation with optional XX-XXXXXX entry and C##-#????#
Created
·
2023-04-07 19:11
Updated
·
2023-04-07 19:51
Flavor
·
.NET 7.0 (C#)
Checks validity of an EA number first two digits 01-12 followed by hyphen then a number from 0-4 and then 4 numbers or uppercase letters and ending in a 1 or 4 for example "05-1J7601". Adding a capital C to the beginning is also accepted "C05-1J7601", along with the entry of 2 X's hyphen and 6 X's "XX-XXXXXX"
Submitted by
RDJ@Ct
3
Match any layer bracket pair (.NET)
Created
·
2022-03-10 03:13
Flavor
·
.NET 7.0 (C#)
Match any layer bracket pair
Submitted by
Yakumo Yukari
3
Thorough UK Postcode Validator with In/Out code capture groups
Created
·
2016-09-30 15:51
Flavor
·
Python
A more thorough UK postcode validator tested against all UK postcodes on a regular basis, but excluding the special GIRO postcode case out of personal preference. Additionally has capture groups for the In-code and Out-code sections. Requires case insensitive matching.
Submitted by
Chris G
3
Email
Created
·
2016-09-07 03:55
Flavor
·
Python
Python
Submitted by
anonymous
3
Capture Query Strings
Created
·
2016-05-15 10:22
Flavor
·
Python
A solution for capture query params.
Submitted by
Rafael Laurindo
3
iframe src parser
Created
·
2016-01-05 12:41
Flavor
·
Python
Get iframe src
Submitted by
Sumeet Fefar
3
Find URLs in markdown where the lines have been wrapped
Created
·
2014-08-26 21:13
Flavor
·
Python
no description available
Submitted by
anonymous
7
CSS Import
Created
·
2014-05-03 00:51
Flavor
·
Python
no description available
Submitted by
anonymous
5
Find consecutive duplicate words
Created
·
2015-08-31 22:17
Flavor
·
Python
no description available
Submitted by
anonymous
4
Bible reference extractor
Created
·
2016-04-04 08:31
Flavor
·
Python
For scraping http://skepticsannotatedbible.com/
Submitted by
antaytheist-owner
3
phone
Created
·
2015-05-07 17:14
Flavor
·
Python
matches: + example: +52 33 3884 7720 +1 770 343 5788
Submitted by
miqui
4
Complete imgur link regex
Created
·
2015-03-13 11:26
Flavor
·
Python
This regex grabs all kinds of imgur links and groups them in meaningful names aswell. This way you have full flow-control in your python-scripts.
Submitted by
Mio
3
prices in nis
Created
·
2015-06-15 15:16
Flavor
·
Python
no description available
Submitted by
molaxx
3
date time
Created
·
2014-01-29 03:45
Flavor
·
Python
1/Jul/2013 03:27:12
Submitted by
himel
3
Twitch URL Regex
Created
·
2015-03-15 12:53
Flavor
·
Python
Can grab all kinds of valid twitch URLs.
Submitted by
Mio
2
Discord IP Blocker
Created
·
2025-01-24 23:48
Updated
·
2025-01-24 23:56
Flavor
·
Rust
Blocks IPs that are sent in discord. Will block any IP, even if the numbers aren't in valid ranges (like 327.19.8.79) Has basic protections against whitespace
Submitted by
Bee3D
2
Discord emoji & Markdown links
Created
·
2024-12-14 18:33
Updated
·
2024-12-14 18:36
Flavor
·
Rust
NOTE The word text is used to substitute all alphanumeric characters as well as underscores (a-zA-Z0-9_]). Captures: [x] [text (the text in the parentheses doesn't get scanned) x] [text x] :text: Doesn't capture: [ ] [ ] [text] [ ] [text ] [ text ] [ text [ ] : text: [ ] :text : [ ] : text :
Submitted by
anonymous
2
Command line parser
Created
·
2024-08-23 09:01
Updated
·
2024-08-23 10:28
Flavor
·
.NET 7.0 (C#)
Supports parameters such as keys and values, also parameters enclosed in quotes.
Submitted by
Pavel Bashkardin
2
Discord Anti-Advertisement 2
Created
·
2023-12-18 13:25
Updated
·
2024-01-23 15:38
Flavor
·
Rust
Pair this with my Discord AutoMod Anti Advertisement for full protection against invites. Use this with Discord's Built In AutoMod.
Submitted by
dogknife
2
Discord Anti Advertisement
Created
·
2023-12-17 20:34
Updated
·
2024-01-23 17:37
Flavor
·
Rust
Discord AutoMod Regex Use this Regex with Discord's built-in automod to prevent all invite URLs. This will block discord.gg/ad but not .gg/ad Consider seeing my "strict" version otherwise.
Submitted by
dogknife
2
Discord AutoMod Advert (Strict)
Created
·
2023-12-17 01:36
Updated
·
2024-01-23 17:37
Flavor
·
Rust
Use this with Discord automod. Bear in mind, this is "Strict" because it will block discord.gg/myad AND other links such as dsc.gg/myad
Submitted by
dogknife
2
Rust Phone Number
Created
·
2023-10-23 21:47
Flavor
·
Rust
not fully featured, but simple.
Submitted by
Jakersnell
2
Python regular expression to detect any type of group link and private channel in Telegram
Created
·
2023-07-23 15:57
Updated
·
2023-07-24 15:49
Flavor
·
Python
You can use this regular expression to identify any type of Telegram link. It doesn't matter whether it is t.me or telegram.me. Links including "joinchat" are also accepted.
Submitted by
Telegram : T.me/TinyPY
2
URL Regex
Created
·
2023-07-06 08:43
Updated
·
2023-07-06 08:45
Flavor
·
.NET 7.0 (C#)
Matches protocol, domain, port, path, query and anchor as named capturing groups.
Submitted by
Jonathan
2
Aus Mobile number
Created
·
2023-03-20 06:22
Flavor
·
.NET 7.0 (C#)
validates against multiple common formats
Submitted by
anonymous
2
Get ip address (only ipv4) Validator
Created
·
2023-02-20 18:43
Updated
·
2023-02-21 12:05
Flavor
·
.NET 7.0 (C#)
Get ip address (only ipv4) Validator
Submitted by
Mr.Tang
2
Phone number for all countries
Created
·
2023-02-07 07:33
Flavor
·
.NET 7.0 (C#)
Phone number for all countries. Valid symbols: ( ), -, whitespace
Submitted by
Alexander Smirnov
2
Replace sub-strings in string
Created
·
2023-01-01 01:47
Flavor
·
.NET 7.0 (C#)
Replace sub-strings in string
Submitted by
anonymous
2
SGR ANSI escape sequences
Created
·
2022-09-10 16:24
Flavor
·
Python
Find all SGR-type ANSI escape sequences
Submitted by
delameter
2
Zoom links, only with passwords
Created
·
2022-08-17 19:04
Flavor
·
.NET 7.0 (C#)
Group 1 will have meeting id, group 2 will have password
Submitted by
anonymous
2
Simple HTML to Markup
Created
·
2022-03-18 07:23
Flavor
·
Python
converts HTML: This is hyperlink. You can click this. to Markup: This is hyperlink. You can click this. which renders like this: This is hyperlink. You can click this.
Submitted by
toryano0820
Load More
Community Library Entry
4
Regular Expression
Created
·
2014-10-07 12:03
Flavor
·
PCRE (Legacy)
/
import
\S
+
\w
+
/
g
Open regex in editor
Description
no description available
Submitted by
anonymous