Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
Order By
Most Recent
Most upvotes
Most downvotes
Highest Score
Lowest Score
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 18,040 community submitted regex patterns...
1
Strong Password
PCRE (PHP <7.3)
1 digit 1 lower case 1 upper case 1 special character (no-space) 8-20 length
Submitted by
Femi Fapohunda
-
9 years ago
1
Regex SCript replace
ECMAScript (JavaScript)
no description available
Submitted by
MGO
-
9 years ago
1
Currency Detector Python
Python
Currency Detector for Python
Submitted by
Joao Graca
-
9 years ago
1
dd-mm-yyyy
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
1
RegEx - Exclude zero
PCRE (PHP <7.3)
RegEx - Exclude zero
Submitted by
http://stackoverflow.com/questions/8910972/regex-exclude-zero
-
9 years ago
1
Slovak phone number
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
Find Markdown links, but not image
PCRE (PHP <7.3)
no description available
Submitted by
Chuck
-
9 years ago
1
anti-xss regex
ECMAScript (JavaScript)
this is a white list regex that invalidates input with "=
Submitted by
Ivan Cai
-
9 years ago
(Last modified a year ago)
1
Indian mobile numbers
PCRE (PHP <7.3)
All indian mobile phone numbers are till now are in the format of +91-(789)(9-digits) or +91(789)(9-digits) or 0(789)(9-digits). those numbers which are come into this category is valid with this RegEx.
Submitted by
N shoban babu
-
9 years ago
1
whitespaces and positive numerics
ECMAScript (JavaScript)
//Accepts whitespaces and positive numeric values including integers and decimals(ortional) with 3 precisions only. //Ex: "999", "99999.999", " 999.999" -> ACCEPTABLE
Submitted by
Pubudu (motustudio)
-
9 years ago
1
Globality APP
PCRE (PHP <7.3)
no description available
Submitted by
globality team
-
9 years ago
1
Russian phone number validater
PCRE (PHP <7.3)
Russian phone number validater
Submitted by
Russell of sitesoft
-
9 years ago
1
https://www.facebook.com/video.php?v=1009222819122586
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
match start of line subsubsection
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
Match parenthesis
Python
Matches anything wrapped in parenthesis. Can handle nested and consecutive sets of parenthesis.
Submitted by
Nic Roland
-
9 years ago
1
parse table
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
Match pointless spaces in space separated list
ECMAScript (JavaScript)
'test' - no match 'test test' - no match ' test' - match (space at the start) 'test ' - match (space at the end) 'test test' - match (single space in the middle)
Submitted by
J. Harry B.
-
9 years ago
1
url regex
PCRE (PHP <7.3)
spoon library
Submitted by
anonymous
-
9 years ago
1
french phone number
PCRE (PHP <7.3)
french phone number
Submitted by
lolo64
-
9 years ago
1
simple json key -value
PCRE (PHP <7.3)
simple json key -value parser
Submitted by
ReMMeR
-
9 years ago
1
...
842
843
844
845
846
...
902
Community Library Entry
1
Regular Expression
PCRE (PHP <7.3)
/
(
\[
(?:
[^
[
\]
]
*
?
)
\]
\s
*
?
(?=
\[
)
)
|
(
\[
(?:
[^
[
\]
]
*
?
)
\]
(?!
\s
*
[
\|
&
]
\s
*
.
)
)
|
(?:
\[
[^
[
\]
]
*
?
]
)
|
(
[^
&
\|
\s
]
+
)
\s
+
(?=
[^
&
\|
\s
]
+
)
/
g
Open regex in editor
Description
/**
this regex should match most cases where the user forgets to put an operator somewhere and add an OR, it still
does not handle nested square brackets but those are invalid anyways
this page has an explanation
https://regex101.com/r/fF7wO1/2
the way this regex grabs conflicting matches is by oring different cases together in the order we want to grab them in
the first case is for a set of brackets immediately followed by an opening bracket (seperate them with an or)
the second case is for a set of brackets immediately followed by any non operator character (seperate with an or)
the third case is for a set of brackets followed by an operator (do nothing)
the final case is for two words outside of brackets seperated by a space (fill space with an or)
@type {RegExp} */
Submitted by
warnock
-
9 years ago