Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
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 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 3,940 community submitted regex patterns...
1
Extraire sku URL
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
10 years ago
1
Spanish NIE / NIF Validator
ECMAScript (JavaScript)
no description available
Submitted by
Gauravity
-
9 years ago
1
How to limit total number of characters of match
ECMAScript (JavaScript)
I need to match a pattern as follows with the added limitation that the match must be exactly 7 characters long: /^\d[a-zA-Z]\d$/ In words, this is a 7 character sequence of 6 digits and one alphabetic character in any order. How do I limit the overall length to 7 using regex? Thanks!
Submitted by
Andy S
-
9 years ago
1
MY RFC 5322 implementation
ECMAScript (JavaScript)
My RFC 5322 implementation for email validation with few limitation on top level domain name
Submitted by
DevJustWantHaveFun
-
9 years ago
1
quantity matcher
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
1
big apple is fool
ECMAScript (JavaScript)
no description available
Submitted by
litianzhao
-
9 years ago
1
Extract video code from YouTube URL
ECMAScript (JavaScript)
no description available
Submitted by
@uimanwashere
-
9 years ago
1
SIP Address Validator
ECMAScript (JavaScript)
This Regular Expression Validates SIP Addresses
Submitted by
Tarun Telang, Sanjay Sinha
-
9 years ago
1
match arguments similar to shell, supports quoted string
ECMAScript (JavaScript)
first group matches quoted strings second group plain text, arguments are separated with a space. example: "this is a \"string\"" thisisnot "another \"string\" with a backslash \"\\"" just replace \" with " after matching.
Submitted by
anonymous
-
9 years ago
1
Simple Date regex
ECMAScript (JavaScript)
With format dd/MM/yyyy
Submitted by
Magador
-
9 years ago
1
Cleveland, OH
ECMAScript (JavaScript)
CLeveland, OH ||| SanDiego, CA this regex will pick up on those
Submitted by
anonymous
-
9 years ago
1
cross platform file extension in node/io.js
ECMAScript (JavaScript)
This regex will match the file extension on any platform in node.js or io.js.
Submitted by
Russell Dempsey
-
9 years ago
1
Uppercase words
ECMAScript (JavaScript)
no description available
Submitted by
MaaxZoom
-
9 years ago
1
get top level domain excluding ports
ECMAScript (JavaScript)
I need to get the top level domain from the request header but it can be in a vary ways.. how can I match but exclude parts I dont want to get ie. ports
Submitted by
nei
-
9 years ago
1
Google Sheets Reference Formula
ECMAScript (JavaScript)
Matches and extracts the relevant parts of reference formulas from Google Sheets. For instance: ='Test Sheet'!H$5
Submitted by
anonymous
-
9 years ago
1
NSE0(.*)\nNSE1\s+(.*)\nNSE2\s(.*)\nNSE3\s+(.*)kbps.*\nNSE4\s+(.*)\nNSE
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
1
AD Default Password Policy
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
1
Only return what's between the brackets i.e. (a)
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
1
spaces in parenthesis
ECMAScript (JavaScript)
Eliminate spaces in the inner part of parenthesis.
Submitted by
Luis Colorado
-
9 years ago
1
HTML Anchor <a> Tag Grabber(overcome newlines)
ECMAScript (JavaScript)
no description available
Submitted by
Namikaze Ray a.k.a Pendecosen
-
9 years ago
1
...
126
127
128
129
130
...
197
Extract parts of a URL on Python
2
Regular Expression
Python
r"
^
(
(?P<scheme>
[^
:/?#
]
+
)
:
(?=
//
)
)?
(
//
)?
(
(
(?P<login>
[^
:
]
+
)
(?:
:
(?P<password>
[^
@
]
+
)?
)?
@
)?
(?P<host>
[^
@/?#:
]
*
)
(?:
:
(?P<port>
\d
+
)?
)?
)?
(?P<path>
[^
?#
]
*
)
(
\?
(?P<query>
[^
#
]
*
)
)?
(
#
(?P<fragment>
.
*
)
)?
"
gm
Open regex in editor
Description
Extract parts of a URL on Python
Submitted by
dixanms
-
2 years ago