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 13,420 community submitted regex patterns...
10
15 upvotes, 5 downvotes (score 53.1%) (You must be signed in to vote)
Just validate one sequence of
PCRE (PHP <7.3)
sdfs sdfs FLBREV00022230 dsfsdfs sdfsf FLBREV00022234 In this case is false
Submitted by
Fiipe
-
9 years ago
2014-10-23 13:22
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
6
7 upvotes, 1 downvotes (score 52.9%) (You must be signed in to vote)
SO: fail2ban regular to find 403 request in nginx
Python
http://stackoverflow.com/q/25778420/2072035
Submitted by
anonymous
-
9 years ago
2014-09-15 11:32
(Last modified 2 months ago)
2023-07-27 20:59
6
7 upvotes, 1 downvotes (score 52.9%) (You must be signed in to vote)
[A-Za-z\x{0600}-\x{06FF}\x{1000}-\x{1021}_-][-\w]*
PCRE (PHP <7.3)
A-Za-z\x{0600}-\x{06FF}\x{1000}-\x{1021}_-*
Submitted by
[A-Za-z\x{0600}-\x{06FF}\x{1000}-\x{1021}_-][-\w]*
-
9 years ago
2014-11-03 16:04
8
11 upvotes, 3 downvotes (score 52.4%) (You must be signed in to vote)
Extract url GET parameters
PCRE (PHP <7.3)
Returns key/value pair of a url. Also works with google fonts which has additional information
Submitted by
anonymous
-
9 years ago
2014-09-16 08:37
8
11 upvotes, 3 downvotes (score 52.4%) (You must be signed in to vote)
If-Then-Else Conditionals
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-08-28 15:52
28
77 upvotes, 49 downvotes (score 52.4%) (You must be signed in to vote)
CSV line parsing
PCRE (PHP <7.3)
Captures all fields from a CSV file's line. Can be customized with user-defined field separator and protecting character.
Submitted by
Various
-
9 years ago
2014-10-15 13:22
51
191 upvotes, 140 downvotes (score 52.3%) (You must be signed in to vote)
Disorted Email Addresses
PCRE (PHP <7.3)
Matches distorted email addresses and converts them back to real ones.
Submitted by
dislick
-
11 years ago
2013-01-16 14:11
7
9 upvotes, 2 downvotes (score 52.3%) (You must be signed in to vote)
Sentence grabber /w extra check
PCRE (PHP <7.3)
Grabs sentences including terms like: e.g. z.b. Figs.These get caught in 1st capturing group. Problem: how to only accept matching sentences which contain pattern \b\d+[a-z]{0,2}\b?
Submitted by
light0
-
9 years ago
2014-05-29 17:30
7
9 upvotes, 2 downvotes (score 52.3%) (You must be signed in to vote)
Max - URL Extract
PCRE (PHP <7.3)
no description available
Submitted by
Ayush
-
7 years ago
2016-05-09 10:38
18
310 upvotes, 292 downvotes (score 52.3%) (You must be signed in to vote)
Date: DD-MM-YYYY hh:mm:ss
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE (PHP <7.3)
Validate and capture dateTime parts, includes validation for leap years, range 1000-2999. Fixed bug
Submitted by
Ka.
-
10 years ago
2013-05-17 13:07
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
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
For Auto RTFs
PCRE (PHP <7.3)
no description available
Submitted by
Dan Bloomquist
-
11 years ago
2013-03-22 03:32
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
outer Parentheses
PCRE (PHP <7.3)
Finds the outermost pair of parentheses. Compatible with any amount of nesting
Submitted by
Jonas Gerneth
-
9 years ago
2014-04-25 11:43
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Command handling
PCRE (PHP <7.3)
Handles commands like in CMD
Submitted by
anonymous
-
9 years ago
2014-09-07 07:03
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
parsing a numeric strings with backslash using regexp
PCRE (PHP <7.3)
no description available
Submitted by
A.K. Asik
-
9 years ago
2014-11-13 17:42
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
uri parser
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-03-25 13:20
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Match nth occurence of pattern
PCRE (PHP <7.3)
Match nth occurence of the patterns in the inner parenthesis. Put nth that you want to match in the curly braces (here, {3}).
Submitted by
Alex Hall
-
8 years ago
2015-05-01 17:34
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Equation matching (without equal)
Python
use this to get value of any side of an equation. You can combine this with https://regex101.com/r/fH5kJ1/1
Submitted by
Kerosene2000
-
8 years ago
2015-07-01 19:50
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Epic EHR Sticker QR code patient information
PCRE (PHP <7.3)
Text output produced by reading the QR code present on patient stickers created by Epic (R) medical record software
Submitted by
MeWa
-
8 years ago
2015-07-28 06:54
1
2
3
4
5
6
...
671