Please enable JavaScript to use regex101
Regular
Expressions
101
Support Regex101
Social
Info
Regex Editor
Community Library
Account
Regex Quiz
Order By
Most Recent
Most upvotes
Most downvotes
Highest Score
Lowest Score
Filter by Flavor
PCRE2 (PHP)
JavaScript
Python
Golang
Java
.NET 7.0 (C#)
Rust
POSIX ERE
POSIX BRE (grep/sed)
PCRE (Legacy)
Sponsors
Learn to code interactively with bite-sized, hands-on programming challenges.
Community Library
Search community submissions...
0/512
-2
rustyms: pro forma single modification
Created
·
2023-06-21 21:59
Type
·
Match
Flavor
·
Rust
The regex to match a single pro forma modification with all its intricacies.
Submitted by
Douwe Schulte
-1
Grep from A to B
Created
·
2021-01-03 13:38
Updated
·
2023-07-25 15:34
Type
·
Match
Flavor
·
Rust
no description available
Submitted by
Anonymous
1
Keep Talking and Nobody Explodes - Passwords
Created
·
2025-07-18 05:15
Type
·
Unit Tests
Flavor
·
Rust
See the chapter On the Subject of Passwords in Bomb Defusal Manual
Submitted by
prprnya
2
Discord IP Blocker
Created
·
2025-01-24 23:48
Updated
·
2025-01-24 23:56
Type
·
Match
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
Type
·
Match
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
1
AOC 2024 D3 regex
Created
·
2024-12-03 11:28
Type
·
Match
Flavor
·
Rust
The regex to be used in both parts of adventofcode.com 2024 day 3 puzzle
Submitted by
dragmine149
1
Discord Server Invite, Rust RegEx
Created
·
2024-06-26 07:33
Type
·
Match
Flavor
·
Rust
A regular expression for Rust that matches against Discord server invite URLs, but not those without an actual code present. This may be used in Discord's AutoMod feature as it supports up to 10 Rust regular expressions per custom rule.
Submitted by
sepruko
1
JS/TS imports of external dependencies
Created
·
2024-06-25 08:26
Type
·
Match
Flavor
·
Rust
This regex can be used on a JavaScript/TypeScript file to find imports from third-party packages. This is useful for determining what to put in dependencies/peerDependencies. This is a Rust regex, which makes it easy to use with rg (ripgrep). Pro tip: combine rg with sort -u to get a list of all packages for your JS/TS project! Based on a similar PCE2 regex
Submitted by
Nikita Karamov
1
"fake" markdown link detection
Created
·
2024-04-25 18:42
Updated
·
2024-04-26 18:15
Type
·
Match
Flavor
·
Rust
This regex catches markdown links where the display text is also a link, like this: \example.com in order to prevent people getting tricked and clicking on a link that isn't what it says it is. See the test string for a much longer explanation with examples.
Submitted by
Osh
2
Discord Anti-Advertisement 2
Created
·
2023-12-18 13:25
Updated
·
2024-01-23 15:38
Type
·
Match
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
Type
·
Match
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
Type
·
Match
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
1
Rust type-like ident casing
Created
·
2023-11-04 19:35
Type
·
Match
Flavor
·
Rust
Matches built-in primitives and identifiers with casing conventionally used for type/constant names.
Submitted by
Neel Yadav
2
Rust Phone Number
Created
·
2023-10-23 21:47
Type
·
Match
Flavor
·
Rust
not fully featured, but simple.
Submitted by
Jakersnell
1
Prometheus Exposition metric line
Created
·
2023-05-30 09:41
Type
·
Match
Flavor
·
Rust
Prometheus exposition metric line format. Parses metric lines with named capture groups for metric name, labels, value, and timestamp. Excludes comment, type, and help lines. https://prometheus.io/docs/instrumenting/exposition_formats/#line-format
Submitted by
james-jra
0
Unicode Hexadecimal
Created
·
2023-05-17 21:24
Updated
·
2023-05-17 21:52
Type
·
Match
Flavor
·
Rust
Find hexadecimal numbers using Extended Unicode Support.
Submitted by
Anonymous
1
Get python function declaration
Created
·
2023-05-01 17:57
Type
·
Match
Flavor
·
Rust
Gets the python function declarations
Submitted by
Anonymous
Community Library Entry
2
Regular Expression
Open Workspace
/
^\d
+
(?:
[
.
]
\d
{1,2}
|
$
)
$
/
Description
Created
·
2014-12-14 09:10
Type
·
Unit Tests
Flavor
·
JavaScript
Checks that value is float format and has two digits at max
Submitted by
@jprajani
Open Workspace