Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Social
Join the Discord community!
Follow me on twitter!
Send me an email
Donate
Donate
Donate through Paypal
Become a Github Sponsor
Info
Info
Find out what's new!
RegEx101 Wiki
Report bugs or make suggestions
What's new?
Loading content...
Close
Regex Editor
Regex Editor
Community Patterns
Community Patterns
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Get help on Discord
Get help on IRC
Order By
Most Recent
Highest Score
Lowest Score
Most upvotes
Most downvotes
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET (C#)
Rust
Sponsors
Community Patterns
Search among 420 community submitted regex patterns...
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Facebook IDs
Java 8
A general regular expression that uses the keywords 'Facebook' and 'id' to collect strings that contain Facebook IDs. Also, added an additional condition to where if there's a long numeric string it will be match a group given that, 'Facebook' is within the string. This is a special use-case and can...
Submitted by
loganmcampbell
-
2 years ago
2022-03-16 19:27
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
9 Digit SSN String
Java 8
If for whatever reason there isn't a delimiter within your data to for storing your SSNs you should be able to use this regular expression to capture 9 digit strings within data. You might need to add special keywords to filter out false positives.
Submitted by
loganmcampbell
-
2 years ago
2022-03-16 19:30
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Specific Year Dates (Regular Expression)
Java 8
Here's a regular expression to handle a specific year in the different forms of dates: YYYY-MM-DD DD-MM-YYYY MM-DD-YYYY ...
Submitted by
loganmcampbell
-
2 years ago
2022-03-16 19:33
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Extract columns names from any select query
Golang
This regex can capture any column name from a select query. Be the original name, like are named on table, renamed with a reserved word AS or even without explicit AS. Go on, and test with your query ;)
Submitted by
Jefferson Gouveia
-
5 years ago
2018-06-28 19:25
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
IPv4 private CIDR range RFC1918
Golang
Validates that you provide a CIDR in one of the following valid ranges. 0.0.0 – 127.255.255.255 127.0.0.0/8 0.0.0 – 10.255.255.255 10.0.0.0/8 16.0.0 – 172. 31.255.255 172.16.0.0/12 192.168.0.0 – 192.168.255.255 192.168.0.0/16...
Submitted by
David Stockton
-
4 years ago
2020-01-20 10:24
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
get video id from youtube link
Golang
no description available
Submitted by
RyuaNerin
-
8 years ago
2016-01-23 20:19
(Last modified 5 months ago)
2023-07-24 18:14
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Regular expression for capturing dates and date ranges.
Java 8
A proof of concept regex that captures dates and date ranges with a variety of separators. Works with both DMY and MDY, and if one is not needed, it can be easily deleted from the regex. The full variety of months needs to be implemented by the programmer themselves since developing it in regex101...
Submitted by
Matey Krastev
-
2 years ago
2022-04-07 20:19
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
nginx access regex loki
Golang
nginx access log regex
Submitted by
Lethisa Putri
-
a year ago
2022-07-28 11:51
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
IP Address
Java 8
(^([0-9]{2,3}.)([0-9]{2,3}.)([0-9]{2,3}.)([0-9]{2,3})$)
Submitted by
anonymous
-
a year ago
2022-08-02 08:40
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
1
Golang
11
Submitted by
anonymous
-
a year ago
2022-08-26 15:36
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
phone number middle number parsing
Java 8
middle number parsing regex
Submitted by
anonymous
-
a year ago
2022-09-26 05:32
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
AsciiDoc delimited block example
Java 8
https://docs.asciidoctor.org/asciidoc/latest/blocks/delimited/
Submitted by
aisbergde
-
a year ago
2022-10-10 10:07
(Last modified a year ago)
2022-10-10 10:08
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Replace ^ with Math.pow function. Not made to work with braces.
Java 8
Replaces ^ with Math.pow function call. This assumes all braces have been combined first. If you need help with the combination, I got you—try this Python algorithm: def evaluate_braces(expr): """Recursively evaluate expressions within braces""" Check if expression contains braces if '(' in...
Submitted by
Glitchii - https://github.com/Glitchii
-
9 months ago
2023-03-15 22:00
(Last modified 9 months ago)
2023-03-15 22:30
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Email finder
Java 8
Matches with the valid email addresses.
Submitted by
anonymous
-
8 months ago
2023-03-27 23:58
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
json value extract
Java 8
json value extract
Submitted by
anonymous
-
8 months ago
2023-04-01 02:24
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
golang re2 negative lookahead
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
-
8 months ago
2023-04-21 10:28
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Türkiye Araç Plaka Regexi - Türkiye Car Plate Regex
Java 8
Gist link for Java : https://gist.github.com/Gencturk-m/9962ce1e1dcf4dd9307062e34b023183 Aşağıdaki yapıdaki plakaları kabul eder: "01-81 X 9999", "01-81 X 99999"...
Submitted by
Melih Gençtürk - https://github.com/gencturk-m
-
8 months ago
2023-04-24 20:44
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Authelia regex path rules
Golang
Testing Authelia subdomain / path rules. You can read more at the Authelia Docs By default, this regex101 page is shown a test for a generic API path domain: "some-sub.drpranavmishra.com" resources:...
Submitted by
Pranav Mishra
-
7 months ago
2023-05-06 19:29
(Last modified 7 months ago)
2023-05-07 13:35
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
extract <*n or <n where n is a number
Golang
see https://stackoverflow.com/questions/76228402/regex-to-extract-n-where-n-is-digit
Submitted by
code_monk
-
7 months ago
2023-05-11 14:37
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Home
Golang
Dj dus er geen je een je aan je enige eerst een he we er
Submitted by
Webmaster
-
7 months ago
2023-05-13 08:42
1
2
3
4
5
6
...
21
extract <*n or <n where n is a number
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Regular Expression
Golang
`
\<\*
?
\d
+
`
g
Open regex in editor
Description
Loading markdown...
Submitted by
code_monk
-
7 months ago
2023-05-11 14:37