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,020 community submitted regex patterns...
2
Replace dotnet assembly versions
Python
Replaces both VB & C# AssemblyInfo files.
Submitted by
ankostis
-
3 years ago
(Last modified 3 years ago)
2
object
PCRE2 (PHP >=7.3)
Json Object
Submitted by
anonymous
-
3 years ago
2
Guid (with or without dashes)
ECMAScript (JavaScript)
Matches a guid string that can optionally include dashes.
Submitted by
anonymous
-
3 years ago
2
US phone number
PCRE2 (PHP >=7.3)
US phone number, try to catch as many as possible
Submitted by
anonymous
-
3 years ago
2
.htaccess wordpress redirect uploads to production domain
PCRE2 (PHP >=7.3)
.htaccess wordpress redirect uploads to production domain
Submitted by
anonymous
-
3 years ago
2
spring logback parser
PCRE2 (PHP >=7.3)
Spring boot logback 日志正则匹配。 样例日志 2019-12-27 13:52:38.201 INFO 1 --- [Thread-8] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2019-12-27 13:52:39.535 INFO 1 --- [Thread-8] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed ...
Submitted by
LiuDecai
-
3 years ago
2
Regex for complex number
ECMAScript (JavaScript)
it can detect complex number of both cartesian and Euler form.the real number in the real and imaginary part can be signed or unsigned.also it may or may not have floating Point.no problem. But,in Euler from the imaginary part should be written between brackets.here are some example:- +5.6+7i,-.004...
Submitted by
Adnan nabib
-
3 years ago
2
Mobile Number Regex
PCRE2 (PHP >=7.3)
The following regex validates international mobile numbers
Submitted by
anonymous
-
3 years ago
2
Email Extractor
PCRE2 (PHP >=7.3)
([a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9_-]+)
Submitted by
Kashif
-
3 years ago
2
yyyy/mm/dd
Java 8
^(((\d{3}[1-9]|\d{2}[1-9]\d|\d[1-9]\d{2}|[1-9]\d{3})(\/)(((0[13578]|1[02])(\/)(0[1-9]|[12]\d|3[01]))|((0[469]|11)(\/)(0[1-9]|[12]\d|30))|(02(\/)(0[1-9]|[1]\d|2[0-8]))))|(((\d{2})(0[48]|2468|13579)|((0[48]|2468|3579)00))(\/)02(\/)29))$ Match year/month/day, date format. E.g: 2021/08/25 [match] 2021/...
Submitted by
mayl0421
-
3 years ago
2
Html tag parser
PCRE2 (PHP >=7.3)
This regex will help you to parse html tag. Example ...
Submitted by
denchiklut
-
3 years ago
2
JavaScript semicolon adder
ECMAScript (JavaScript)
This is a regex to use on JavaScript code that is missing semicolons
Submitted by
samunemeth
-
3 years ago
1
Test expression
PCRE2 (PHP >=7.3)
To find at most 3 a in string
Submitted by
anonymous
-
3 years ago
1
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
-
3 years ago
2
Check Phone numbers
PCRE2 (PHP >=7.3)
Other patterns
Submitted by
https://joserobinson.com
-
3 years ago
2
Match Javanese Script Syllable
PCRE2 (PHP >=7.3)
Match any syllable based on javanese script unicode
Submitted by
anonymous
-
3 years ago
(Last modified 3 years ago)
2
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
-
3 years ago
2
Get commands from Neebula Discovery Language NDL
ECMAScript (JavaScript)
Matches the commands from Neebula Discovery Language NDL, which is used in ServiceNow Discovery Patterns.
Submitted by
James Griffith
-
3 years ago
(Last modified 3 years ago)
2
Grabify URL Detector
PCRE2 (PHP >=7.3)
Detects any Grabify IP tracker links
Submitted by
ShadowNox
-
3 years ago
2
UUID 4
PCRE2 (PHP >=7.3)
Detects any UUID 4 strings
Submitted by
ShadowNox
-
3 years ago
1
...
70
71
72
73
74
...
901
Community Library Entry
0
Regular Expression
PCRE2 (PHP >=7.3)
/
preg_replace
(
'!
\s
+
!',
'
',
$
s
)
/
gm
Open regex in editor
Description
/preg_replace('!\s+!', ' ', $s)/gm
Submitted by
anonymous
-
2 years ago