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 17,260 community submitted regex patterns...
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Valid date (DD-MM-YYYY) from 1900 to 2099
Java 8
Valid date (DD-MM-YYYY) from 1900 to 2099
Submitted by
Nevix-Sama
-
7 months ago
2023-02-24 19:28
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
letter-space-number.js
PCRE2 (PHP >=7.3)
Javascript piscine
Submitted by
erik044
-
7 months ago
2023-02-24 15:16
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regex Tutorials CodeAmooz.net
PCRE2 (PHP >=7.3)
Regex Tutorials CodeAmooz.net
Submitted by
anonymous
-
7 months ago
2023-02-24 10:39
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
简单日志匹配
Java 8
普通日志匹配, 匹配出字段: [time, level, logClass, content]
Submitted by
qinxike
-
7 months ago
2023-02-24 07:06
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
XTrim
PCRE2 (PHP >=7.3)
Remove spaces at the beginning and end of a sentence. It also replaces N consecutive spaces with a single one.
Submitted by
abrittaf
-
7 months ago
2023-02-24 01:46
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
REGEX yt-dlp ID
PCRE2 (PHP >=7.3)
Get ID from plain text fromm yt-dlp
Submitted by
anonymous
-
7 months ago
2023-02-23 19:29
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
unit selector regex
PCRE2 (PHP >=7.3)
This regex can be used to select SI units of gallon, litres, kilograms, kilometres, pounds.
Submitted by
anonymous
-
7 months ago
2023-02-23 06:57
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Get anything between parentheses
PCRE (PHP <7.3)
Use to get any character, digit or space between parentheses
Submitted by
Vini Pereira
-
7 months ago
2023-02-23 03:07
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Function call capture group
Python
Function call capture group
Submitted by
anonymous
-
7 months ago
2023-02-23 02:37
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Javascript HTTP URL Validation
PCRE2 (PHP >=7.3)
Use to validate basic website URLs with or without http://. I took bits and pieces of other regexes I found and compiled into one that worked well for my purposes.
Submitted by
Daniel Ecker
-
7 months ago
2023-02-22 22:14
-1
0 upvotes, 1 downvotes (score 0%) (You must be signed in to vote)
alluse
PCRE (PHP <7.3)
/^(?P0|[1-9]\d)\.(?P0|[1-9]\d)\.(?P0|[1-9]\d)(?:-(?P(?:0|[1-9]\d|\da-zA-Z-)(?:\.(?:0|[1-9]\d|\da-zA-Z-))))?(?:\+(?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/gm
Submitted by
alluse
-
7 months ago
2023-02-22 18:30
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
match name and surname in a name.surname@domain.com email.
Java 8
This will match any words that show up before the @ sign in an email. Digits, dots, commasz and other special characters are ignored.
Submitted by
WojciechW
-
7 months ago
2023-02-22 14:20
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Script Tag Removal.
PCRE2 (PHP >=7.3)
Removes "" tags from plain text notes.
Submitted by
anonymous
-
7 months ago
2023-02-22 05:12
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
date range
ECMAScript (JavaScript)
.
Submitted by
anonymous
-
7 months ago
2023-02-21 23:34
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Hightlight pipe regex
PCRE2 (PHP >=7.3)
A regex to find a searchQuery inside html But not: inside tag inside tag indide href of tag
Submitted by
Robair
-
7 months ago
2023-02-21 14:50
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
redirect old slugs to new
PCRE2 (PHP >=7.3)
redirect old slugs to new
Submitted by
anonymous
-
7 months ago
2023-02-21 13:16
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Get ip address (only ipv4) Validator
.NET (C#)
Get ip address (only ipv4) Validator
Submitted by
Mr.Tang
-
7 months ago
2023-02-21 12:10
(Last modified 7 months ago)
2023-02-21 12:15
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Checking time for AM/PM format
PCRE2 (PHP >=7.3)
Support both capital and small letters, could be 01:00AM of 1:00AM
Submitted by
VS
-
7 months ago
2023-02-21 06:37
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
match html reg
Python
match html reg
Submitted by
anonymous
-
7 months ago
2023-02-21 06:26
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Get ip address (only ipv6) Validator
.NET (C#)
Get ip address (only ipv6) Validator
Submitted by
Mr.Tang
-
7 months ago
2023-02-20 19:35
(Last modified 7 months ago)
2023-02-21 12:08
1
...
33
34
35
36
37
38
39
...
863
Match last repetition and remove it
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Regular Expression
ECMAScript (JavaScript)
/
(
a
+
)
(
.
*
)
(
\1
)
/
g
Open regex in editor
Description
Loading markdown...
Submitted by
Icaruk
-
9 months ago
2022-12-28 09:12