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,560 community submitted regex patterns...
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
match C# class definition
PCRE (PHP <7.3)
match C# a class definition
Submitted by
luan castro (@castrolol)
-
8 years ago
2015-07-29 03:47
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
OG by Sam
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-28 18:08
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Function Parameter Switcher
PCRE (PHP <7.3)
Switches the order of two functions in a parameter.
Submitted by
anonymous
-
8 years ago
2015-07-28 16:24
-1
1 upvotes, 2 downvotes (score 6.1%) (You must be signed in to vote)
website
PCRE (PHP <7.3)
If needed to test entered website
Submitted by
Max Shishkov
-
8 years ago
2015-07-28 13:07
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
ipv4 and ipv6
PCRE (PHP <7.3)
no description available
Submitted by
shri
-
8 years ago
2015-07-28 09:44
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
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
ScoutPro data
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-07-28 01:36
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Parse CSV fields
PCRE (PHP <7.3)
Parse an input string into fields separated by comma.
Submitted by
anonymous
-
8 years ago
2015-07-27 23:44
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Hex Input List
PCRE (PHP <7.3)
Match one or two digit hex values separated by a comma.
Submitted by
anonymous
-
8 years ago
2015-07-27 23:42
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Quartz Cron Validation
PCRE (PHP <7.3)
http://stackoverflow.com/questions/2362985/verifying-a-cron-expression-is-valid-in-java
Submitted by
anonymous
-
8 years ago
2015-07-27 12:13
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
1
...
523
524
525
526
527
528
529
...
578
Error Regex
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
(
(?!
while
|
if
|
for
\b
)
\b\w
+
)
\s
*
\(
(
.
*
)
\)
/
g
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
8 years ago
2015-06-21 02:23