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 9,440 community submitted regex patterns...
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
TTML time expression offset-time
PCRE (PHP <7.3)
no description available
Submitted by
ovvland
-
8 years ago
2016-01-10 16:52
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Remove _1 suffix from image filenames
PCRE (PHP <7.3)
Remove autogenerated file name suffixes from images whilst preserving the extension (e.g. .jpg) These suffixes are usually added when filename already exists in the directory an image is being saved to by an application. Magento is a fine example of a system that does this.
Submitted by
John Hughes
-
8 years ago
2016-01-18 15:03
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
pronouceable strings
PCRE (PHP <7.3)
find pronouceable 10 letter srings that are either all caps or all lowercases based on jsbin.com pronouceable urls
Submitted by
anonymous
-
8 years ago
2016-01-24 19:11
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
To search for a image tag
PCRE (PHP <7.3)
This pattern would select the whole image tag
Submitted by
Dulsara Dhanuka Sethunga
-
8 years ago
2016-01-27 15:47
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Active Affiliate, Contractor or Employee
PCRE (PHP <7.3)
no description available
Submitted by
MR
-
8 years ago
2016-01-27 22:18
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
CSS Length Units
PCRE (PHP <7.3)
Matches CSS Length Units according to: http://www.w3schools.com/cssref/css_units.asp
Submitted by
Sander Backus
-
8 years ago
2016-03-11 08:38
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Script Tags
PCRE (PHP <7.3)
This is used when removing Script Tags and their content.
Submitted by
Chris Sumners
-
8 years ago
2016-03-22 13:30
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Time duration format
PCRE (PHP <7.3)
Match time duration in the following formats only: 1h 30m 59m 1h 33m 11h 2m
Submitted by
Pooja Khorjuvekar
-
8 years ago
2016-03-23 08:24
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
HSL(A) Color Matching
PCRE (PHP <7.3)
This allows for both hsl and hsla color patterns to be matched. hsla(50.5deg, .531%, .9%, 1.0) The hue can be matched without the word deg. Hue is from 0-360 Percentage allows for decimals. Percentage is from 0-100%...
Submitted by
anonymous
-
4 years ago
2019-06-13 12:08
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Proxy matcher
PCRE (PHP <7.3)
Matches proxies in ip:port format. Takes into account that octets cant start with a 0, and that octets that are not the first octet can be a 0 if there are no more numbers behind it.
Submitted by
Dank meme machine
-
8 years ago
2016-03-29 00:35
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Escherichia coli, partial genome simple coding region search
PCRE (PHP <7.3)
NC_000913.3 Escherichia coli str. K-12 substr. MG1655, patial genome
Submitted by
anonymous
-
8 years ago
2016-03-29 10:34
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Get any positive integer
PCRE (PHP <7.3)
All real numbers can be divided into three categories: positive, negative and zero; Match all positive number Match: 2 9...
Submitted by
norihiori, Me-me
-
8 years ago
2016-05-20 10:03
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Song Splitter
PCRE (PHP <7.3)
Split an audio filename into a readable format for playlists (like jPlayer) assuming the audio file is named like the following: Artist - Song Title.mp3 Band Name - Track Title ft. Another Artist.m4a demon.devin - Faithless Angel (to no avail remix).mp3
Submitted by
demon.devin
-
7 years ago
2016-07-28 17:35
6
12 upvotes, 6 downvotes (score 43.7%) (You must be signed in to vote)
Split address line into street name and house number
PCRE (PHP <7.3)
This regular expression splits an address line like for example "1117 Franklin Blvd" into the street name and house number. It also supports addresses where street name and house number are the other way around (e.g. "Mustermannstr. 1"). Furthermore, this regular expression also supports address lin...
Submitted by
Andre Wisplinghoff
-
9 years ago
2015-04-01 11:28
4
5 upvotes, 1 downvotes (score 43.6%) (You must be signed in to vote)
1st TSV
PCRE (PHP <7.3)
no description available
Submitted by
DynV
-
11 years ago
2013-04-08 22:00
4
5 upvotes, 1 downvotes (score 43.6%) (You must be signed in to vote)
Hungarian ANDOK system id
PCRE (PHP <7.3)
no description available
Submitted by
Tana
-
10 years ago
2014-03-12 15:35
4
5 upvotes, 1 downvotes (score 43.6%) (You must be signed in to vote)
REGEX to parse IIS7 Log File into FluentD
PCRE (PHP <7.3)
This regex parses the entire line of the IIS log files (without detail on the AgentID) for usage into FluentD. Q&C - juan.carniglia@gmail.com
Submitted by
Juan Carniglia
-
10 years ago
2014-05-13 14:50
4
5 upvotes, 1 downvotes (score 43.6%) (You must be signed in to vote)
AMEX, VISA, MASTERCARD, and DISCOVER REGEX
PCRE (PHP <7.3)
First pass at a way to find credit card data using regex.
Submitted by
David Maislin
-
9 years ago
2015-01-22 04:23
4
5 upvotes, 1 downvotes (score 43.6%) (You must be signed in to vote)
Mask an email regex
PCRE (PHP <7.3)
Replaces second to last but one characters in email with asterisks (@ and last . are protected): john.travolta@gmail.com > j*a@g**.m
Submitted by
Wiktor Stribiżew
-
8 years ago
2016-02-03 12:38
4
5 upvotes, 1 downvotes (score 43.6%) (You must be signed in to vote)
c#
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2016-02-18 15:54
1
...
4
5
6
7
8
9
10
...
472
简单日志匹配
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
Java 8
"
(
\d
+
[
-|/
]
\d
+
[
-|/
]
\d
+
\s\S
+
)
\s
+
(
\w
+
)
\s
+
(
[^
:
]
+
)
:
\s
+
(
.
+
)*
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
qinxike
-
9 months ago
2023-02-24 07:06