Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
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 >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 9,400 community submitted regex patterns...
1
ISO 8601 DURATION - Terraform Validation
Golang
This is made to validate an ISO 8601 input in a Terraform variable validation block: validation { condition = can(regex("^P(\\d+Y)?(\\d+M)?(\\d+D)?(T(\\d+H)?(\\d+M)?(\\d+S)?)?$", var.value)) error_message = "The value must be a valid ISO 8601 duration string representing time. (e.g. PT...
Submitted by
anonymous
-
2 days ago
1
Slash Separated Numbers
Golang
...
Submitted by
Anonymous
-
4 days ago
1
Split Docker image into image name, tag and digest with all optional
Golang
Splits a Docker image string into the separate parts: image, tag, digest tag and digest are optional
Submitted by
Roemer
-
2 months ago
3
**japanese text** to bold <b>japanese text</b>
PCRE (PHP <7.3)
japanese text to bold japanese text 食べるんだ 食べるんだ
Submitted by
kurokuroshii
-
2 months ago
(Last modified 2 months ago)
1
RFC3339 Validator
PCRE (PHP <7.3)
RFC3339 Validator
Submitted by
anonymous
-
2 months ago
(Last modified 2 months ago)
1
Automod - Discord scam invitations
PCRE (PHP <7.3)
Matches variations of messages commonly used to send Discord scams/hacks. Instructions are written for YAGPDB
Submitted by
paiuxfluens
-
4 months ago
1
indented lines with continuation
PCRE (PHP <7.3)
Example taken from SO,
Submitted by
anonymous
-
5 months ago
1
Renamer Log file to CSV
PCRE (PHP <7.3)
Catches our log files renamed file names and adds them to CSV file
Submitted by
anonymous
-
6 months ago
1
Detect Multiple File Extensions
PCRE (PHP <7.3)
I use this to find files with two or more extensions (i.e. file.txt.txt). This will work with files with 3 or 4 character or numeric (or both) file extensions (i.e. pdf, xlsx).
Submitted by
Curve
-
8 months ago
(Last modified 8 months ago)
1
Chinese Digits
PCRE (PHP <7.3)
Match Chinese Digits less than 1×10^16, such as “一千两百三十四万”、“八萬点七六五”、“玖仟玖佰玖拾玖万玖仟玖佰玖拾玖亿玖仟玖佰玖拾玖万玖仟玖佰玖拾玖点玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖”,Upper and lower case Chinese can be mixed, but Chinese numbers and English numbers cannot be mixed. Illegal numbers will not be matched. For example: “两十六” will not be matched, as t...
Submitted by
anonymous
-
9 months ago
(Last modified 8 months ago)
1
NPC名称匹配
PCRE (PHP <7.3)
^\h{4}段首4个横向空格 +不包含左括号、换行符号的其他字符,1~无限循环 \((.*)\)$捕获处于()之中的任意字符内容,右括号在段尾
Submitted by
vicrly
-
10 months ago
1
77870294
PCRE (PHP <7.3)
618001/041881 564094
Submitted by
960203095053
-
a year ago
(Last modified a year ago)
1
Kafka loki parser
Golang
Kafka loki parser
Submitted by
anonymous
-
a year ago
1
groupping math every 2 comma separator
PCRE (PHP <7.3)
i have paste \n after every 2-th comma using sed sed 's/\(\(*,\)\{2\}\)/\1\n/g'
Submitted by
sanekmihailow
-
a year ago
1
Remove specific parameter from URL
PCRE (PHP <7.3)
This pattern finds a parameter (sst) key + value in a GET request URL. When replaced with an empty string, effectively removes the parameter. Works with both full URLs and isolated query strings. Works in PCRE and PCRE2. Full use case: if (isset($_GET["sst"])) { // validate...
Submitted by
Martin Holt
-
a year ago
(Last modified a year ago)
1
Opportunity Close
PCRE (PHP <7.3)
Prepare batch job for opportunity close
Submitted by
wistlo
-
a year ago
1
Adds custom prefix to tailwind classes
PCRE (PHP <7.3)
Or any other particular case where given any line that starts with the pattern "@apply" (or any other line heading) and it substitutes any word (list of characters without spaces), with or without puntuation in them, and it adds a custom prefix to all the words in that line but the line heading.
Submitted by
@drakopablo.dev
-
a year ago
2
Invalid Windows Filename Chars
PCRE (PHP <7.3)
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file Integer value zero, sometimes referred to as the ASCII NUL character. Characters whose integer representations are in the range from 1 through 31, except for alternate data streams where these characters are allowed. For more info...
Submitted by
anonymous
-
a year ago
(Last modified a year ago)
1
0x28C6A6DdF8fF8A47A90A69bfE75cd89904a14d71
Golang
0x28C6A6DdF8fF8A47A90A69bfE75cd89904a14d71
Submitted by
anonymous
-
a year ago
2
Mikrotik firewall logs
Golang
Matching for mikrotik ROS 7 Used in promtail and grafana
Submitted by
anonymous
-
a year ago
(Last modified a year ago)
1
2
3
...
470
Community Library Entry
1
Regular Expression
PCRE (PHP <7.3)
/
(
(
[^
,
]
*
,
){2}
)
/
gm
Open regex in editor
Description
i have paste \n after every 2-th comma using sed
sed 's/\(\([^,]*,\)\{2\}\)/\1\n/g'
Submitted by
sanekmihailow
-
a year ago