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,880 community submitted regex patterns...
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
31
77 upvotes, 46 downvotes (score 53.8%) (You must be signed in to vote)
ninite
PCRE (PHP <7.3)
no description available
Submitted by
peek
-
8 years ago
2015-09-29 11:28
13
76 upvotes, 63 downvotes (score 46.4%) (You must be signed in to vote)
URL Validator
PCRE (PHP <7.3)
Validates - URLs with schemes - http, https and ftp Relative URL starting with / and ../
Submitted by
anonymous
-
9 years ago
2014-09-24 08:41
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
29
70 upvotes, 41 downvotes (score 53.8%) (You must be signed in to vote)
Wrap long string to spec length
PCRE (PHP <7.3)
no description available
Submitted by
fullpipe
-
10 years ago
2013-07-21 20:34
9
67 upvotes, 58 downvotes (score 44.9%) (You must be signed in to vote)
Youtube ID match
PCRE (PHP <7.3)
This regex will match any Youtube video ID thrown at it and return one capturing group containing the ID.
Submitted by
Jacob Overgaard
-
10 years ago
2013-11-28 13:30
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
3
65 upvotes, 62 downvotes (score 42.6%) (You must be signed in to vote)
Match quoted strings, ignoring escaped quotes
PCRE (PHP <7.3)
Matches single or double quoted strings, and ignores backslash-escaped quotes within the string.
Submitted by
Maddingue
-
10 years ago
2013-06-26 14:28
22
59 upvotes, 37 downvotes (score 51.5%) (You must be signed in to vote)
UK Postcode Checker
PCRE (PHP <7.3)
Checks for valid UK/British postcodes. There was another on here that had for some reason been upvoted, but it was actually incorrect as it worked on none of my valid own postcodes! Namely that it assumed two letters and a number (BS3) when you can have variations (M20). Allows for an optional spac...
Submitted by
MaffooBristol
-
9 years ago
2014-10-21 08:23
13
53 upvotes, 40 downvotes (score 46.8%) (You must be signed in to vote)
regex101.com id grabber
PCRE (PHP <7.3)
grabs the ID for the regex101.com permalink to code
Submitted by
chris mccoy
-
9 years ago
2014-08-19 16:10
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
11
42 upvotes, 31 downvotes (score 46.1%) (You must be signed in to vote)
Date(Including Leap Year) YYYY-MM-DD hh:mm:ss
PCRE (PHP <7.3)
Validates DateTime of format YYYY-MM-DD hh:mm:ss including Leap Year
Submitted by
Madhan
-
10 years ago
2014-03-14 16:49
0
41 upvotes, 41 downvotes (score 39.4%) (You must be signed in to vote)
URL matching
PCRE (PHP <7.3)
Complete url matching with storage of various parameters
Submitted by
hjpotter92
-
9 years ago
2014-07-02 06:34
1
37 upvotes, 36 downvotes (score 39.5%) (You must be signed in to vote)
Validate alphanumeric and numeric range
PCRE (PHP <7.3)
For Validating alphanumeric and numeric range
Submitted by
anonymous
-
9 years ago
2014-09-22 09:13
13
35 upvotes, 22 downvotes (score 48.4%) (You must be signed in to vote)
PHP variable name
PCRE (PHP <7.3)
Valid PHP variable name as defined in the manual at http://php.net/manual/en/language.variables.basics.php
Submitted by
Erin Millard
-
11 years ago
2013-02-05 09:18
23
35 upvotes, 12 downvotes (score 60.5%) (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
9
35 upvotes, 26 downvotes (score 44.9%) (You must be signed in to vote)
only numbers
PCRE (PHP <7.3)
A string with only numbers in
Submitted by
Gotts
-
8 years ago
2015-11-26 16:19
17
34 upvotes, 17 downvotes (score 53%) (You must be signed in to vote)
Between tags content
PCRE (PHP <7.3)
no description available
Submitted by
Agustín Bouillet
-
8 years ago
2015-10-24 10:52
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
17
31 upvotes, 14 downvotes (score 54.3%) (You must be signed in to vote)
Capture comma separated numbers
PCRE (PHP <7.3)
Capture comma separated numbers, no matter if there are spaces before or after the commas.
Submitted by
Fernando Nunes
-
8 years ago
2015-07-19 01:57
1
2
3
4
5
...
644
URL Validator
13
76 upvotes, 63 downvotes (score 46.4%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
(
(
(
ftp
|
http
|
https
)
:
\/\/
)
|
(
\/
)
|
(
..
\/
)
)
(
\w
+
:
{0,1}
\w
*
@
)?
(
\S
+
)
(
:
[
0
-
9
]
+
)?
(
\/
|
\/
(
[
\w
#!:.?+=&%@!
\-\/
]
)
)?
/
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
9 years ago
2014-09-24 08:41