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 2,240 community submitted regex patterns...
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
HTML5 email regex
PCRE2 (PHP >=7.3)
Source Mozilla.
Submitted by
anonymous
-
2 months ago
2023-07-09 03:48
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
RegEx for matching PDF files in browser
PCRE2 (PHP >=7.3)
Made for my niche use of adding it to match either PDF files that being viewed directly from a website or when viewed from your local computer. This was done so that I can add it on my usercontent.css file in Firefox with the @-moz-document url-prefix
Submitted by
Benji The Doggy
-
2 months ago
2023-07-08 06:26
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Attribute value
PCRE2 (PHP >=7.3)
eeee
Submitted by
Me
-
2 months ago
2023-07-07 15:12
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
AT+ - Image
PCRE2 (PHP >=7.3)
parse at+ syntax
Submitted by
Carsten
-
2 months ago
2023-07-07 11:19
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
URL Regex
.NET (C#)
Matches protocol, domain, port, path, query and anchor as named capturing groups.
Submitted by
Jonathan
-
3 months ago
2023-07-06 08:43
(Last modified 3 months ago)
2023-07-06 08:45
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Retrieve all number version from tag
PCRE2 (PHP >=7.3)
This regex will retrieve all number in a given tag
Submitted by
Marc Masure
-
3 months ago
2023-07-06 06:41
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Remove .html from url
PCRE2 (PHP >=7.3)
I used in Nginx to rewrite the location from http://example.com/about.html to http://example.com/about
Submitted by
Vijay Amirtha Raj J
-
3 months ago
2023-07-05 11:07
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Extract schema and domain from URI.
PCRE2 (PHP >=7.3)
Doesn't work on domains that include dashes (after the dash).
Submitted by
Roke Julian Lockhart Beedell
-
3 months ago
2023-07-04 22:27
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
telegram links
PCRE2 (PHP >=7.3)
.
Submitted by
AC Lover
-
3 months ago
2023-07-04 18:23
(Last modified 3 months ago)
2023-07-04 18:25
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Single line of .env file
PCRE2 (PHP >=7.3)
Parse a single line of a .env file From repo dotenv - source code here.
Submitted by
Mot (https://github.com/motdotla)
-
3 months ago
2023-07-03 20:25
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
CUIT Argentina sin guiones
PCRE2 (PHP >=7.3)
CUIT Argentina sin guiones
Submitted by
Lucas David Ferrero
-
3 months ago
2023-07-03 12:38
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
All Strings for same-lines, Syntax or Parsing
PCRE2 (PHP >=7.3)
All Strings on One Line Php java javascript python escapes all regex...
Submitted by
kai gouthro
-
3 months ago
2023-07-02 10:16
(Last modified 3 months ago)
2023-07-02 10:19
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
international telephone number incl. european notation
PCRE2 (PHP >=7.3)
international telephone number incl. european notation
Submitted by
Florian Ledeboer
-
3 months ago
2023-06-29 14:13
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
request_uri_no_qs
PCRE2 (PHP >=7.3)
Regular expression used to get the encoded URI portion of the $request_uri when unencoded $uri breaks a reverse proxy. map $request_uri $request_uri_no_qs { "~^(?+)\?(?:.*)?" $m; default $request_uri; } `
Submitted by
jpatton@gmail.com
-
3 months ago
2023-06-28 14:55
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
in-addr.arpa to IPv4
PCRE2 (PHP >=7.3)
Converts in-addr.arpa hostnames to IPv4 e.g. 1.0.0.127.in-addr.arpa to 127.0.0.1
Submitted by
BitesizedLion
-
3 months ago
2023-06-27 14:34
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Match Australian Adresses
PCRE2 (PHP >=7.3)
This Regex Matches Australian Adresses
Submitted by
anonymous
-
3 months ago
2023-06-27 07:58
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Camel-Case Splitter (preserves Acronyms)
.NET (C#)
Splits camel-case string and preserves acronyms
Submitted by
Tyler S.
-
3 months ago
2023-06-26 18:39
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Extracting data from Authorization header
PCRE2 (PHP >=7.3)
Handful regex for parsing Authorization, WWW-Authenticate etc. headers
Submitted by
Alex Furnica
-
3 months ago
2023-06-26 01:20
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
minecraft commands. mcfunction syntax commands detection.
PCRE2 (PHP >=7.3)
finds every command in 1st group and subcommands in 2nd group. excludes every comments, and matches command even if it has spaces in the beginning. This exact regex is used for datapackhub.net datapack mcfunction downgrader.
Submitted by
anonymous
-
3 months ago
2023-06-25 08:32
2
3 upvotes, 1 downvotes (score 30.1%) (You must be signed in to vote)
Discord Username (old & new)
PCRE2 (PHP >=7.3)
Accomodate for Discord's username changeover and match against either the old username or the new username. But only one or the other. Match: CesarHvl#9000 cesarhvl cesar.hvl...
Submitted by
cesarhvl
-
3 months ago
2023-06-23 20:16
1
2
3
4
5
6
7
8
...
112
Nepali phone number regex
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
.NET (C#)
@"
(
\+
977
)?
[
9
]
[
6
-
9
]
\d
{8}
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
a year ago
2022-07-02 10:49