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
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
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
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
Lua Enhanced: +=
Created
·
2022-02-20 11:15
Flavor
·
Python
Adds += to Lua.
Submitted by
anonymous
2
Extract parts of a URL on Python
Created
·
2022-02-02 23:27
Flavor
·
Python
Extract parts of a URL on Python
Submitted by
dixanms
2
Números de telefones brasileiros
Created
·
2021-07-07 20:29
Flavor
·
Python
Permite filtrar e capturar telefones brasileiros seguindo o modelo: Código internacional (+55) caso fornecido DDD (XX) Telefone fixo (XXXX-XXXX) ou telefone móvel com ou sem o "9" inicial (9XXXX-XXXX)
Submitted by
https://github.com/leonsp95
2
Replace dotnet assembly versions
Created
·
2021-06-30 10:48
Updated
·
2021-06-30 13:04
Flavor
·
Python
Replaces both VB & C# AssemblyInfo files.
Submitted by
ankostis
2
IpAddress
Created
·
2021-01-14 09:00
Flavor
·
Python
Ensure the ip address format is correct
Submitted by
aaa
2
lottery data picker
Created
·
2020-12-28 20:55
Flavor
·
Python
for azlottoapi
Submitted by
anonymous
2
Extract fields from repository url
Created
·
2019-09-03 22:45
Flavor
·
Python
It is used to extract fields from the repository URL Works in Python and JS Group1 : protocol (Such as http or https) Group2 : domain (Such as github.com or gitlab.com) Group3: Name space (Such as your personal namespace or project namespace) Group4: Project name (Such as your project name) Python Example: import re #extract project and namespace from project url def extract_fields_from_repo_url(repository_url): matches = re.search(r'([a-z]+):\/\/()\/()\/(.*)\.git', repository_url) protocol = matches.group(1) domain = matches.group(2) name_space = matches.group(3) project = matches.group(4) return {'protocol':protocol, 'domain':domain, 'name_space':name_space, 'project': project} fields = extract_fields_from_repo_url('https://gitlab.com/gitlab-org/gitlab-ce.git') print (fields)
Submitted by
anonymous
2
Ansible Host Var checking
Created
·
2017-02-10 19:33
Flavor
·
Python
We had an issue where the "hosts=some_var" value could cause mass deployments if the wrong value was passed through. Specifically a comma with nothing surrounding it (i.e. "hosts=,"). This regex will allow us to fail when certain characters are present.
Submitted by
anonymous
2
domain for Google Data Studio (re2 dialect)
Created
·
2016-12-12 04:12
Flavor
·
Golang
Matches subdomain, domain and top level in a field that contains a urls. https://www.whatever.you.want ---> whatever.you.want
Submitted by
anonymous
2
.*(\d+).* Selects last number
Created
·
2016-09-13 20:27
Flavor
·
Python
no description available
Submitted by
anonymous
2
IPv6 detection
Created
·
2016-08-15 13:31
Flavor
·
Python
It's too large to match with all which seems like an IPv6. It's not perfect, but it's detects more valid IPv6 than some others regex.
Submitted by
Ajabep
2
Password (4 Classes)
Created
·
2016-08-06 21:47
Flavor
·
Python
1 Uppercase 1 lower case 1 number 1 not a number or letter
Submitted by
anonymous
Load More
Community Library Entry
0
Regular Expression
Created
·
2020-03-03 19:44
Flavor
·
PCRE (Legacy)
/
\b
[
\w
.!#$%&’*+
\/
=?^`{|}~-
]
+
@
[
\w
-
]
+
(?:
\.
[
\w
-
]
+
)*
\b
/
mg
Open regex in editor
Description
no description available
Submitted by
anonymous