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 5,620 community submitted regex patterns...
106
601 upvotes, 495 downvotes (score 51.9%) (You must be signed in to vote)
trim
ECMAScript (JavaScript)
trim string
Submitted by
fp
-
10 years ago
2013-09-10 08:21
72
410 upvotes, 338 downvotes (score 56.4%) (You must be signed in to vote)
Regex for telephone numbers all over the world
Recommended
This entry has been specifically selected by our team to be a great submission
ECMAScript (JavaScript)
Detects most of the phone numbers all over the world
Submitted by
Aditya Joshi
-
10 years ago
2014-04-08 07:58
(Last modified 2 months ago)
2023-10-09 14:47
86
297 upvotes, 211 downvotes (score 54.1%) (You must be signed in to vote)
Password Validation
ECMAScript (JavaScript)
Checks that a password has a minimum of 6 characters, at least 1 uppercase letter, 1 lowercase letter, and 1 number with no spaces.
Submitted by
Christian Klemp
-
8 years ago
2015-07-08 18:46
6
150 upvotes, 144 downvotes (score 45.3%) (You must be signed in to vote)
Password
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
10 years ago
2013-12-06 14:02
(Last modified 4 months ago)
2023-07-21 04:59
31
142 upvotes, 111 downvotes (score 50%) (You must be signed in to vote)
Email address (most used)
ECMAScript (JavaScript)
Email address, most used cases
Submitted by
Jago
-
8 years ago
2015-07-01 09:32
34
123 upvotes, 89 downvotes (score 51.3%) (You must be signed in to vote)
Google like regex
ECMAScript (JavaScript)
Attempts to mimic Google search box behavior, returning an array with the separated search strings (that keep the +/- indicator for following operations)
Submitted by
mettjus
-
10 years ago
2014-05-12 13:35
14
92 upvotes, 78 downvotes (score 46.6%) (You must be signed in to vote)
Phone Number
ECMAScript (JavaScript)
Allows phone numbers with optional country code, optional special characters and whitespace
Submitted by
Tlmader
-
8 years ago
2015-08-11 17:07
16
90 upvotes, 74 downvotes (score 47.2%) (You must be signed in to vote)
Password
ECMAScript (JavaScript)
Safe Password that allow only with a number, a lowercase, a uppercase, and a special character
Submitted by
davidlondono
-
9 years ago
2015-04-28 16:49
35
77 upvotes, 42 downvotes (score 55.8%) (You must be signed in to vote)
IP Address validator
ECMAScript (JavaScript)
Validates IPv4 IP Address
Submitted by
krzysp
-
8 years ago
2015-06-18 12:52
16
74 upvotes, 58 downvotes (score 47.5%) (You must be signed in to vote)
http url regex
ECMAScript (JavaScript)
general purpose HTTP URL regex
Submitted by
Miguel Castillo @manchagnu
-
8 years ago
2015-06-21 19:49
24
67 upvotes, 43 downvotes (score 51.6%) (You must be signed in to vote)
Quote Macthing with escape
ECMAScript (JavaScript)
Matches text within quotes (", ') and escapes the charecters.
Submitted by
Vihan Bhargava
-
9 years ago
2015-05-10 20:48
7
46 upvotes, 39 downvotes (score 43.6%) (You must be signed in to vote)
Date validation
ECMAScript (JavaScript)
Besides leap year handling, this takes care of date validation in the yy-mm-dd format.
Submitted by
anonymous
-
8 years ago
2015-07-24 11:21
22
34 upvotes, 12 downvotes (score 59.7%) (You must be signed in to vote)
grab valid css rules and properties
ECMAScript (JavaScript)
no description available
Submitted by
Pavel Dominguez
-
9 years ago
2015-06-03 19:17
12
31 upvotes, 19 downvotes (score 48.2%) (You must be signed in to vote)
Full name (Turkish)
ECMAScript (JavaScript)
Matches case insensitive first name, optional unlimited number of middle names and last name separated with space format. Replaced \w with explicit char range for Turkish support. (Äž accepted as first char not to over complex)
Submitted by
CKK
-
9 years ago
2014-09-29 13:31
4
26 upvotes, 22 downvotes (score 40.3%) (You must be signed in to vote)
url
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-23 21:43
6
26 upvotes, 20 downvotes (score 42.2%) (You must be signed in to vote)
Simple Number
ECMAScript (JavaScript)
Verifies Number is a negative/positive number. Number may be a decimal, but if it is, it requires at least one number before and after the decimal place. Decimal numbers may also be negative or positive. Only 1 decimal place is allowed.
Submitted by
David P Smith
-
8 years ago
2015-10-20 16:06
15
25 upvotes, 10 downvotes (score 54.9%) (You must be signed in to vote)
Hashtag
ECMAScript (JavaScript)
The secret of the Twitterverse.
Submitted by
Joogl
-
9 years ago
2014-10-05 17:14
16
23 upvotes, 7 downvotes (score 65%) (You must be signed in to vote)
Email (RFC2822)
Recommended
This entry has been specifically selected by our team to be a great submission
ECMAScript (JavaScript)
Email address compliant with RFC2822
Submitted by
Jago
-
8 years ago
2015-07-01 09:31
12
23 upvotes, 11 downvotes (score 50.8%) (You must be signed in to vote)
Username with "_" "-"
ECMAScript (JavaScript)
no description available
Submitted by
Gianvy
-
8 years ago
2015-10-16 15:44
7
22 upvotes, 15 downvotes (score 43.5%) (You must be signed in to vote)
Match text (not within html tag)
ECMAScript (JavaScript)
no description available
Submitted by
Moistly
-
9 years ago
2015-05-12 12:38
1
2
3
4
...
281
入门学习
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
PCRE2 (PHP >=7.3)
/
^\d
{1,2}
\.
*
【判断题】
*
(
.
+
)
\n
*
【答案】
*
(
.
+
)
\n
*
【解析】
*
(
.
+
)
/
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
6 months ago
2023-05-29 13:11