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 500 community submitted regex patterns...
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
lsblk-output-regex
Golang
Trying to adapt this regex to support LVM.
Submitted by
anonymous
-
2 years ago
2021-08-18 18:00
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
yyyy/mm/dd
Java 8
^(((\d{3}[1-9]|\d{2}[1-9]\d|\d[1-9]\d{2}|[1-9]\d{3})(\/)(((0[13578]|1[02])(\/)(0[1-9]|[12]\d|3[01]))|((0[469]|11)(\/)(0[1-9]|[12]\d|30))|(02(\/)(0[1-9]|[1]\d|2[0-8]))))|(((\d{2})(0[48]|2468|13579)|((0[48]|2468|3579)00))(\/)02(\/)29))$ Match year/month/day, date format. E.g: 2021/08/25 [match] 2021/...
Submitted by
mayl0421
-
2 years ago
2021-08-25 12:40
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
yyyy/mm/dd
Golang
^(((\d{3}[1-9]|\d{2}[1-9]\d|\d[1-9]\d{2}|[1-9]\d{3})(\/)(((0[13578]|1[02])(\/)(0[1-9]|[12]\d|3[01]))|((0[469]|11)(\/)(0[1-9]|[12]\d|30))|(02(\/)(0[1-9]|[1]\d|2[0-8]))))|(((\d{2})(0[48]|2468|13579)|((0[48]|2468|3579)00))(\/)02(\/)29))$ Match year/month/day format. e.g: 2020/02/29 [match] 2021/02/29 ...
Submitted by
mayl0421
-
2 years ago
2021-08-25 12:44
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
SQL comments Big Query
Golang
SQL comments on Big Query
Submitted by
anonymous
-
2 years ago
2021-09-23 15:19
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Match Windows filename in any path but only C: D: and F: drives
Java 8
Used for Service Discovery in vRealize Operations. Use case is a service that can be installed on any path, but we only want to discover and monitor services installed on standard production drives (C, D or F). Filename will always be the same.
Submitted by
Various
-
2 years ago
2021-10-02 18:55
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
11
Java 8
11
Submitted by
11
-
2 years ago
2021-10-15 07:02
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Parse Kubernetes Resource URI Paths
Golang
This regex extracts Kubernetes Resource URIs. Copyright 2021 Mathew Wicks Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License....
Submitted by
Mathew Wicks
-
2 years ago
2021-11-05 05:52
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
IPv4 + TCP-Port
Java 8
This regex matches a IPv4 with a TCP Port (1-65535) Example: 192.168.0.69:1337 will match and have the groups: Group 1: 192.168.0.69 Group 2: 1337
Submitted by
SIMULATAN
-
2 years ago
2022-01-12 07:59
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Rick Roll
Java 8
Matches chorus of Never Going to Give You Up
Submitted by
Stephen Battista
-
2 years ago
2022-02-01 19:56
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Android Package Validation - Java Regex
Java 8
Note: replace the "\." with "\\." if you paste this on your java. The regex will match if the package name is valid. example: my.new.hello.world.app Supports: a-z 0-9 and underscore Supports multiple dots
Submitted by
dlv_dls2
-
2 years ago
2022-02-06 06:30
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
匹配中英文括号
Java 8
可以用来替换企业名称中的中英文括号 eg: 阿里巴巴(中国)股份 阿里巴巴(中国)股份
Submitted by
tuan_luo
-
2 years ago
2022-02-10 06:46
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Matching build file names
Java 8
Matches various versions of build file filenames from our jenkins builds
Submitted by
Sean Furrh
-
2 years ago
2022-02-16 22:31
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)
get video id from youtube link
Golang
no description available
Submitted by
RyuaNerin
-
8 years ago
2016-01-23 20:19
(Last modified 4 months ago)
2023-07-24 18:14
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)
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)
Markdown link
.NET (C#)
Regex for parsing markdown link. Named group "text", "url" and "alt.
Submitted by
anonymous
-
a year ago
2022-07-22 11:51
1
2
3
4
5
6
...
25
Regex Card Name - Custom
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Regular Expression
.NET (C#)
@"
^
[
a
-
zA
-
Z
\s\d
\/\+\(\)\#\&
]
*
$
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
8 months ago
2023-03-24 08:53