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
Hexadecimal Colour Code Finder
PCRE2 (PHP >=7.3)
This regex will find any hexadecimal colour code, anywhere in your string Support for: mini 3 letter codes normal 6 letter codes back to back codes
Submitted by
anonymous
-
a year ago
1
SGML & XML
PCRE2 (PHP >=7.3)
Match SGML and XML elements.
Submitted by
anonymous
-
a year ago
1
Match ONLY valid URLs!
PCRE2 (PHP >=7.3)
Match all valid URLs Examples: Valid URLs: https://www.example.com/ http://subdomain.example.net/ https://www.subdomain.example.com.uk/params...
Submitted by
Henriii102
-
a year ago
(Last modified a year ago)
1
CSV
Java 8
Crude CSV regex to split only by characters surrounded by non-whitespace characters. Ignore that it dosen't highlight all of the other commas in the editor. If you select the g regex flag it will properly show here, but not work in Java. Credit to @merosity (Merosity#0135) on Discord!
Submitted by
Merosity, regice202
-
a year ago
1
Opportunity Close
PCRE (PHP <7.3)
Prepare batch job for opportunity close
Submitted by
wistlo
-
a year ago
1
URL (URI) - TOTAL Breakdown: Named Groups (Supporting Literal, Relative, Dynamic URLs, with/without Filename/Ext, Query Parameters and/or Anchor Tags)
ECMAScript (JavaScript)
Need to FULLY Break Out EVERY Component of a URL? Like, as in "every constituent element individually accessible in its own named capture group?" Need it to be pre-optimized and fully ECMA-compliant? Want to see exhaustive unit tests proving these claims (144 are included; all 144 execute in 6.5ms. ...
Submitted by
@JJ for Nerdy Deeds, LLC
-
a year ago
(Last modified a year ago)
1
Patron de Blogs
PCRE2 (PHP >=7.3)
Patron para la busqueda de URLS En sitemaps de blogs
Submitted by
anonymous
-
a year ago
1
One letter in row
PCRE2 (PHP >=7.3)
([a-z])(?!.*\1)
Submitted by
anonymous
-
a year ago
1
Match all Tailwind CSS classes prefixed with dark:
PCRE2 (PHP >=7.3)
A simple expression for removing Tailwind CSS classes that are prefixed with dark: from your HTML. Can be easily changed to remove any other classes with a specific prefix. I made this so I could easily remove dark mode from Tailwind CSS components I find online.
Submitted by
hexrw
-
a year ago
1
git url dissecting
PCRE2 (PHP >=7.3)
the various parts of a git url are dissected and made available in the respective capture groups
Submitted by
anonymous
-
a year ago
1
Capturing elements inside square brackets
PCRE2 (PHP >=7.3)
Using regex, you can use a pattern that takes three comma-separated elements and then extracts the third element from inside the brackets.
Submitted by
anonymous
-
a year ago
1
DSL tags missing closing pair tags
PCRE2 (PHP >=7.3)
Checking whether all [b] tag pairs are present in *.dsl text
Submitted by
anonymous
-
a year ago
1
Full name split
PCRE2 (PHP >=7.3)
It allows to divide the full name into its three parts
Submitted by
anonymous
-
a year ago
1
remove Markdown language Wrapper
PCRE2 (PHP >=7.3)
to remove language wrapper in markdown files
Submitted by
Mohamed Elserety
-
a year ago
(Last modified a year ago)
1
HGVS - ClinVar Submission
Python
HGVS Nomenclature Check for ClinVar Submissions
Submitted by
anonymous
-
a year ago
(Last modified a year ago)
1
Adds custom prefix to tailwind classes
PCRE (PHP <7.3)
Or any other particular case where given any line that starts with the pattern "@apply" (or any other line heading) and it substitutes any word (list of characters without spaces), with or without puntuation in them, and it adds a custom prefix to all the words in that line but the line heading.
Submitted by
@drakopablo.dev
-
a year ago
2
Invalid Windows Filename Chars
PCRE (PHP <7.3)
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file Integer value zero, sometimes referred to as the ASCII NUL character. Characters whose integer representations are in the range from 1 through 31, except for alternate data streams where these characters are allowed. For more info...
Submitted by
anonymous
-
a year ago
(Last modified a year ago)
1
Validate local host or local network
PCRE2 (PHP >=7.3)
Validate localhost:port, 127.0.:port, 192.168.:port
Submitted by
anonymous
-
a year ago
1
regex chuoi tieng viet tuong doi
PCRE2 (PHP >=7.3)
aa
Submitted by
anonymous
-
a year ago
1
line end marker
PCRE2 (PHP >=7.3)
marks ends of lines with ; (if you wrote something as an example in python and switched to php and you are too lazy to write ; after each line) doesnt marks it where its not supposed to mark (after { ( [ = , : and ; as an example
Submitted by
anonymous
-
a year ago
1
...
41
42
43
44
45
...
902
Community Library Entry
1
Regular Expression
PCRE2 (PHP >=7.3)
/
(?n)
^
(
https
?
:
\/\/
)?
(
(?!
-
)
[
a
-
z
\d
-
]
{2,63}
(?<!
-
)
\.
)+
[
a
-
z
]
{2,24}
(
\.
[
a
-
z
]
{2}
)?
(
\/
(
(
[
a
-
z
\.
]
+
\/
?
)+
|
[
\w
-
]
*
\?
(
&
?
\w
+
=
[^
&#
]
+
)+
|
#
\w
+
(
\/
\w
+
)?
)+
)?
$
/
gi
Open regex in editor
Description
Match all valid URLs
Examples:
Valid URLs:
https://www.example.com/
http://subdomain.example.net/
https://www.subdomain.example.com.uk/params
Invalid URLs:
htp://invalid.com/
https//invalid.net/
https://invalid.org./
http://.invalid_url.net/
See all 62 URL samples in "Unit Tests"!
Note: All URL samples are made by ChatGPT!
Submitted by
Henriii102
-
a year ago
(Last modified a year ago)