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 11,540 community submitted regex patterns...
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Lookahead phone test with formatting
PCRE (PHP <7.3)
Let's say a phone number is valid in case it has 11 digits only (13 in case of using 00 instead of +). Separators could be anywhere. Take the valid numbers and bring to common format. Original idea was deleting all non-digits but using look-ahead made impossible to use + for remove non-digits, it ne...
Submitted by
zolo
-
8 years ago
2015-07-26 05:45
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
If a line seems valid phone number, change to common format
PCRE (PHP <7.3)
Let's say a phone number is valid in case it has 11 digits (or 13 in case we use 00 instead of + ). Take those lines to common format. original idea was to remove all non-digit characters from those lines with simple match like but combined with look-ahead it just did not work, had to go through ea...
Submitted by
zolo
-
8 years ago
2015-07-25 18:34
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
sql: insert into
PCRE (PHP <7.3)
insert into table ( a, b, c ) values ( " insert into values (1,2,3)",1,2.3,"a,b" ); insert into table (ee,bb,cc) values (aa,234,"asj",2.3);
Submitted by
suat erenler - sua.gen.tr
-
8 years ago
2015-07-25 11:15
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
sql: insert into
PCRE (PHP <7.3)
insert into (a,b,c) values (1,2.3,"test");
Submitted by
suat erenler - sua.gen.tr
-
8 years ago
2015-07-25 11:00
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
SQL: insert into
PCRE (PHP <7.3)
insert[\s]+into[\s]+\([\s](?.?)[\s]\)[\s]+values[\s]+\((?.?)[\s]*\);
Submitted by
suat erenler
-
8 years ago
2015-07-25 10:57
2
4 upvotes, 2 downvotes (score 30%) (You must be signed in to vote)
Replace REM by blank
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-25 10:42
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
credit card
PCRE (PHP <7.3)
Based on http://www.regular-expressions.info/creditcard.html This example includes test strings. This only validates the pattern, and not whether the credit card number passes a checksum validation. See the Luhn algorithm for details https://en.wikipedia.org/wiki/Luhn_algorithm...
Submitted by
Steve Piercy
-
8 years ago
2015-07-25 03:39
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Simple @user replacement
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-24 14:37
-2
1 upvotes, 3 downvotes (score 4.6%) (You must be signed in to vote)
HTML <script> regex
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-24 13:56
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Year regexp
PCRE (PHP <7.3)
regexp for year filtering
Submitted by
anonymous
-
8 years ago
2015-07-24 13:06
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
IP V4 with leading zero values
PCRE (PHP <7.3)
no description available
Submitted by
shA.t
-
8 years ago
2015-07-24 11:07
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Extract jsfiddle links
PCRE (PHP <7.3)
Extract jsfiddle links
Submitted by
Shrinivas Shukla
-
8 years ago
2015-07-24 08:36
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
Registration Email Address
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-24 05:34
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
url and path match with or without http|https
PCRE (PHP <7.3)
this is the most perfect pattern I reach for url with query or anchor
Submitted by
Gehad Mohamed
-
8 years ago
2015-07-24 01:29
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Single lone digits
PCRE (PHP <7.3)
Find single digits that are not part of an integer. For example, "27" should not match, but "27.1" will match the "1". "27.11" won't match.
Submitted by
Conan Dombroski
-
8 years ago
2015-07-23 20:25
0
2 upvotes, 2 downvotes (score 15%) (You must be signed in to vote)
/[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-23 17:23
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
python:S117
PCRE (PHP <7.3)
Local variable and function parameter names should comply with a naming convention
Submitted by
anonymous
-
8 years ago
2015-07-23 15:46
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
Nickname
PCRE (PHP <7.3)
Nickname validation. Only: letters _ One line. Tested with RoR
Submitted by
Paramoshkin Andrew
-
8 years ago
2015-07-23 12:07
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
add colon between hours and minutes to time (24h system)
PCRE (PHP <7.3)
This expression converts any 3- or 4 digit timevalue to a value with colon between hours and minutes. So 345 is converted to 3:45 and 1500 is converted to 15:00
Submitted by
Patrick Sinke
-
8 years ago
2015-07-23 11:34
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
Facebook url regex
PCRE (PHP <7.3)
no description available
Submitted by
Devs Devaras
-
8 years ago
2015-07-23 09:49
1
...
523
524
525
526
527
528
529
...
577
ewqewq
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
\W
+
/
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
8 years ago
2015-06-21 18:17