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
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
Extract URL parts only named capturing groups
Created
·
2022-02-03 00:00
Flavor
·
Golang
Extract URL parts only named capturing groups
Submitted by
dixanms
3
Markdown Heading
Created
·
2021-12-14 21:41
Flavor
·
Java
Parses the text following a '#' and a space all the way up to the next return character. Additional #'s can be added for parsing of other type of headings!
Submitted by
Hansen
3
Hostname validation
Created
·
2017-01-29 01:16
Flavor
·
Golang
Validates subdomain, root domain, and wild card domains
Submitted by
AnonymousDapper
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
Regex tutorial
Created
·
2020-07-01 10:00
Updated
·
2023-07-20 07:05
Flavor
·
Java
Case insensitive match the whole word betwween \bword\b
Submitted by
anonymous
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
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
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
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
Check Email Validity
Created
·
2023-11-15 10:54
Updated
·
2023-11-15 17:35
Flavor
·
Java
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>
2
Rust Phone Number
Created
·
2023-10-23 21:47
Flavor
·
Rust
not fully featured, but simple.
Submitted by
Jakersnell
2
CSV
Created
·
2023-09-09 10:06
Flavor
·
Java
Crude CSV regex to split only by characters surrounded by non-whitespace characters. Ignore that it dosen't highlight all of the other commas in the editor. If you select the g regex flag it will properly show here, but not work in Java. Credit to @merosity (Merosity#0135) on Discord!
Submitted by
Merosity, regice202
2
Mikrotik firewall logs
Created
·
2023-08-11 19:09
Updated
·
2023-08-11 21:09
Flavor
·
Golang
Matching for mikrotik ROS 7 Used in promtail and grafana
Submitted by
anonymous
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
golang re2 negative lookahead
Created
·
2023-04-21 10:28
Flavor
·
Golang
Aquivalent solution for golang's unsupported negative lookahead in re2 flavor of go's regex. This example provides a negative lookahead similar to (?!/api/) ignoring routes with the /api/ prefix at the start.
Submitted by
misha
2
SGR ANSI escape sequences
Created
·
2022-09-10 16:24
Flavor
·
Python
Find all SGR-type ANSI escape sequences
Submitted by
delameter
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
2
Asciidoc PlantUML Block
Created
·
2022-03-15 13:11
Flavor
·
Java
Regex to select PlantUML Block in Asciidoc documents
Submitted by
anonymous
2
Lua Enhanced: +=
Created
·
2022-02-20 11:15
Flavor
·
Python
Adds += to Lua.
Submitted by
anonymous
Load More
Community Library Entry
35
Regular Expression
Created
·
2015-06-18 12:52
Flavor
·
ECMAScript (JavaScript)
/
^
(
25
[
0
-
5
]
|
2
[
0
-
4
][
0
-
9
]
|
[
01
]
?
[
0
-
9
][
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
][
0
-
9
]
|
[
01
]
?
[
0
-
9
][
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
][
0
-
9
]
|
[
01
]
?
[
0
-
9
][
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
][
0
-
9
]
|
[
01
]
?
[
0
-
9
][
0
-
9
]
?
)
$
/
Open regex in editor
Description
Validates IPv4 IP Address
Submitted by
krzysp