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,360 community submitted regex patterns...
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
mega.nz files and folders
PCRE2 (PHP >=7.3)
Regex for matching https://mega.nz file and folder URLs. https://github.com/tonikelope/megabasterd/issues/215
Submitted by
anonymous
-
2 years ago
2021-07-06 17:55
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Mobile Number Regex
PCRE2 (PHP >=7.3)
The following regex validates international mobile numbers
Submitted by
anonymous
-
2 years ago
2021-07-14 10:58
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Html tag parser
PCRE2 (PHP >=7.3)
This regex will help you to parse html tag. Example Title ...
Submitted by
denchiklut
-
2 years ago
2021-08-27 09:22
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Check Phone numbers
PCRE2 (PHP >=7.3)
Other patterns
Submitted by
https://joserobinson.com
-
2 years ago
2021-09-18 14:56
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Match Javanese Script Syllable
PCRE2 (PHP >=7.3)
Match any syllable based on javanese script unicode
Submitted by
anonymous
-
2 years ago
2021-09-18 13:08
(Last modified 2 years ago)
2021-09-18 13:16
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
RFC1918 - Private IPv4 addresses
PCRE2 (PHP >=7.3)
Validate a given IP v4 address against all three defined Private IPv4 Subnets as statet in RFC1918 10.0.0.0/8 172.16.0.0/20 192.168.0.0/16 ...
Submitted by
0100101101001
-
2 years ago
2021-09-22 11:58
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Grabify URL Detector
PCRE2 (PHP >=7.3)
Detects any Grabify IP tracker links
Submitted by
ShadowNox
-
2 years ago
2021-09-26 17:54
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
UUID 4
PCRE2 (PHP >=7.3)
Detects any UUID 4 strings
Submitted by
ShadowNox
-
2 years ago
2021-09-26 18:11
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Delete hour range
PCRE2 (PHP >=7.3)
Select duplicate a.m. - p.m range
Submitted by
profeivan
-
2 years ago
2022-03-05 01:44
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Pattern for usual email address
PCRE2 (PHP >=7.3)
Intentionally leaves out weird stuff such as IPV4 or IPV6 for the domain part and quoted usernames with invalid chars in the addressee part. Handles internationalized domains with soft validation (only structural matching) and blocks domain parts starting or ending with dashes or containing double d...
Submitted by
Victor Schröder
-
2 years ago
2022-03-22 11:51
2
3 upvotes, 1 downvotes (score 30.1%) (You must be signed in to vote)
Mime type parser
.NET (C#)
A "simple" regex to parse mime types. Handles all commonly occurring parts of a mime type string such as: Type Subtype Subtype's with an extra extension (e.g. svg+xml) (Optional input) Multiple parameters (Optional input)...
Submitted by
Vespion
-
10 months ago
2023-02-14 14:11
(Last modified 10 months ago)
2023-02-14 16:03
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
-
5 months ago
2023-06-23 20:16
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Test expression
PCRE2 (PHP >=7.3)
To find at most 3 a in string
Submitted by
anonymous
-
2 years ago
2021-09-17 06:10
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
PHP North American Phone Number
PCRE2 (PHP >=7.3)
Format phone numbers to look nice! E.g. 12345678900 --> +1(234)-567-8900 Matches with most ways numbers are stored 1.234.567.8900 1 234 567 8900...
Submitted by
Mendel Groner
-
2 years ago
2021-09-17 16:48
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Password - mot de passe
PCRE2 (PHP >=7.3)
1 caractère minuscule minimum 1 caractère majuscule minimum 1 chiffre minimum 1 caractère spécial minimum pas d'espace 8 caractères minimum en tout
Submitted by
Sofiane
-
a year ago
2022-07-25 15:24
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Task 4 Quiz
PCRE2 (PHP >=7.3)
It needs a major modification, since matching an integer is required. The accepted answer \d+ involves only "positive" integers. But -333 or +777 are also integers, which leads to two possible solutions with the last one being the most accurate: -?\d+ : The hyphen (optional minus sign) and a digit ...
Submitted by
seQuienSoy
-
a year ago
2022-10-21 23:39
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Chercher un Prénom ou un Nom
.NET (C#)
no description available
Submitted by
anonymous
-
7 years ago
2016-09-07 06:13
(Last modified 5 months ago)
2023-07-20 05:13
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Word Wrap examples
PCRE2 (PHP >=7.3)
Four examples of word wrapping at the 80 character mark, each one taking fewer steps than the last. Comment and uncomment lines with # to see the difference between versions. Optimization discussions welcome!
Submitted by
OnlineCop
-
6 years ago
2017-07-27 00:53
(Last modified 2 months ago)
2023-10-11 15:14
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
PHP Class Capture Groups from symbol string for Class, Namespace, Operation (Mutator or Accessor), Target and Method Names
PCRE2 (PHP >=7.3)
The is helpful for parsing the symbolic reference of a PHP class object for validation or just determining the type and target for the operator. The expression is intended for working with classes and class methods, so the value on the right of the Paamayim Nekudotayim :: will alway be regarded as ...
Submitted by
Jacob Canote
-
3 years ago
2021-02-06 05:32
(Last modified 3 years ago)
2021-02-06 10:07
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Custom IFrame SRC Grabber
PCRE2 (PHP >=7.3)
no description available
Submitted by
Moep
-
3 years ago
2021-01-23 14:08
(Last modified 3 years ago)
2021-01-23 14:09
1
2
3
4
5
6
...
118
Replace sub-strings in string
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Regular Expression
.NET (C#)
@"
(
\d\d\d\d
)
(
\d\d
)
(
\d\d
)
_
(
\d\d
)
(
\d\d
)
(
\d\d
)
(
\S
+
)
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
a year ago
2023-01-01 01:47