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 200 community submitted regex patterns...
0
totalsource
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
acountant
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
totalsource
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
SEMS
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
conatact
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
sem
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
SEMS
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
SEMS
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
SEMS
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
Cookie mask keywords
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
cadence-Virtuoso_Multi_mode_Simulation
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
Test
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
emojis
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
Golang fmt verbs
Golang
Can be used to find all of the verbs in a golang format string. It will correctly extract verbs that would otherwise be specified by fmt.Sprintf, including their flags, width and precision. You can test it out on the fmt documentation, here: https://golang.org/pkg/fmt/
Submitted by
anonymous
-
4 years ago
0
test
Golang
no description available
Submitted by
anonymous
-
4 years ago
0
Domain validation regex suitable for user input
Golang
This regexp can be used to validate domain names in Golang. While it cannot enforce the 253 character limit (with optional trailing period not included) that can be easily done with a len(domain) <= 253 check. This can be used as-is in other languages, even with RE2 regex engine. Non-capturing grou...
Submitted by
anonymous
-
4 years ago
1
Domain validation regex suitable for user input
Golang
This regexp can be used to validate domain names in Golang. While it cannot enforce the 253 character limit (with optional trailing period not included) that can be easily done by a simple len(domain) <= 253 check as well. This can be used as-is in other languages, even with RE2 regex engine. If po...
Submitted by
Alexander Dupuy
-
4 years ago
0
KDE_Converter_Runner_Regex
Golang
WIP
Submitted by
anonymous
-
5 years ago
0
Boucle d'or
Golang
Attrape la famille ours
Submitted by
anonymous
-
5 years ago
0
ISO 8601 Datetime Validation
Golang
no description available
Submitted by
anonymous
-
5 years ago
1
...
4
5
6
7
8
...
10
JWT pattern
1
Regular Expression
ECMAScript (JavaScript)
/
e
[
yw
]
[
A
-
Za
-
z0
-
9-_
]
+
\.
(?:
e
[
yw
]
[
A
-
Za
-
z0
-
9-_
]
+
)?
\.
[
A
-
Za
-
z0
-
9-_
]
{2,}
(?:
(?:
\.
[
A
-
Za
-
z0
-
9-_
]
{2,}
){2}
)?
/
g
Open regex in editor
Description
handles both JWS (3 segments) and JWE (5 segments)
remove the ending
(?:(?:...
to handle JWS only
segments 1+2 are expected tp start with
e[yw]
, an encoded start of JSON object
{"
or
{\n
remove/extend it to match used token structure
or make it even more restrictive
(ey[IJ]|ewo)
to match encoded
{"\w
or
{\n"
payload (2nd segment) may be empty
both header (1st segment) and payload are expected to start with
eyJ
, a base64 encoded start of JSON object
{"
accepts only proper Base64url encoding (RFC 4648) without Base64 padding
=
test it at
https://regex101.com/r/V99DS0
Submitted by
iki
-
3 months ago
(Last modified 2 months ago)