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 12,760 community submitted regex patterns...
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Sentence checker
ECMAScript (JavaScript)
This will validate any nu of lines
Submitted by
noby nirmal
-
7 years ago
2016-05-28 12:46
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
sentence checker
PCRE (PHP <7.3)
This will check for any no of strings
Submitted by
noby nirmal
-
7 years ago
2016-05-28 12:45
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
sentence regex
PCRE (PHP <7.3)
This regex will pick sentences.
Submitted by
noby nirmal
-
7 years ago
2016-05-28 12:15
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
Line match
ECMAScript (JavaScript)
Regex to match any no of lines
Submitted by
noby nirmal
-
7 years ago
2016-05-28 07:36
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Extracts table names from SELECT query
PCRE (PHP <7.3)
Finds table names in table list and subqueries. Table names are in group #1 of all matches One note. In case of table list (like SELECT * FROM table1, table2, etc) group#1 will contain all tables string (like "table1, table2, etc") so it's necessary to do additional handing like splitting the string
Submitted by
Mykhaylo Khodorev (mykhaylo.khodorev@gmail.com)
-
7 years ago
2016-05-27 22:16
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Detects IPv4 and IPv6 addresses
PCRE (PHP <7.3)
This is loosely based on some other examples, but goes a bit further in terms of what it will and won't match. In particular, it matches IPv6 addresses like ff02::, ff02:1000::, and (the syntactically valid but improbable) ::0001:0002
Submitted by
Alan
-
7 years ago
2016-05-27 20:28
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
CSV : Match values with carriage return
PCRE (PHP <7.3)
Use with csv with ";" delim. Matches values that contains carriage return not surrounded by double quotes.
Submitted by
anonymous
-
7 years ago
2016-05-27 19:44
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
email regex
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
7 years ago
2016-05-27 17:09
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Match only first occurrence of word in a line.
PCRE (PHP <7.3)
Match only first occurrence of word in a line.
Submitted by
Vivek Shah
-
7 years ago
2016-05-27 16:24
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
match non-regular words
PCRE (PHP <7.3)
no description available
Submitted by
Jason
-
7 years ago
2016-05-27 15:04
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
password8s
PCRE (PHP <7.3)
password con 8
Submitted by
anonymous
-
7 years ago
2016-05-27 14:49
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
men
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
2016-05-27 08:05
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Credit Card (Master/Visa)
PCRE (PHP <7.3)
Searches for credit card numbers from MasterCard or visa
Submitted by
SamPad
-
7 years ago
2016-05-27 05:33
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Getting video urls from content
PCRE (PHP <7.3)
For use on wordpress on multisite. Finds mp4 videos within the content.
Submitted by
Mike Kormendy
-
7 years ago
2016-05-27 03:39
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
IPv4 addresses that don't match RFC1918
PCRE (PHP <7.3)
Matches publicly available IPv4 addresses (excludes 10., 172.16-32, and 192.168 blocks).
Submitted by
anonymous
-
7 years ago
2016-05-26 17:57
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Todo Comments
ECMAScript (JavaScript)
no description available
Submitted by
Marvin Hagemeister
-
7 years ago
2016-05-26 17:03
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Liberal URL detector
PCRE (PHP <7.3)
Detects almost all URLs contained in a sentence
Submitted by
https://gist.github.com/gruber
-
7 years ago
2016-05-26 13:55
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
<a href="([^"]*)"[^<]*>(?:(?!<\/?a\b[^<]*>)[\s\S])*<img src="([^"]*)"\
PCRE (PHP <7.3)
no description available
Submitted by
Ivan Vlajic
-
7 years ago
2016-05-26 13:23
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
IP adress or masks
PCRE (PHP <7.3)
Match any IP adress or Subnet masks and split all bytes in capture groups
Submitted by
SkullPand4
-
7 years ago
2016-05-26 10:00
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
URL Match and split
PCRE (PHP <7.3)
match any type of url and split each part (protocol, domain, page, GET, and ID) in capture groups
Submitted by
anonymous
-
7 years ago
2016-05-26 09:53
1
...
445
446
447
448
449
450
451
...
638
Time Parsing
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
^
#
New
line
T
?
(
[
00
-
23
]
{2}
)
#
Hour
block
(00
through
23
hours)
\:
?
(
[
00
-
59
]
{2}
)
#
Minute
block
(00
through
59
minutes)
\s
*
#
Optional
space
(
[
ap
]
)?
\.
?
(
m
?
)
\.
?
#
AM
or
PM,
with
or
without
periods
$
#
End
of
the
string.
/
imgx
Open regex in editor
Description
Loading markdown...
Submitted by
Michael Stemle
-
7 years ago
2016-05-19 14:57