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
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 7.0 (C#)
Rust
Sponsors
Community Patterns
Search among 9,440 community submitted regex patterns...
0
Markdown
PCRE (PHP <7.3)
Working with Markdown
Submitted by
anonymous
-
2 years ago
0
regex para CPF
PCRE (PHP <7.3)
Verificação simplificada dígitos CPF
Submitted by
anonymous
-
2 years ago
0
Replace <b> HTML tag with <strong> tag
PCRE (PHP <7.3)
Replace old formatting HTML tag with semantic tag. It can be used as a template for replacing any HTML tag, like , etc.
Submitted by
O’Reilly Regular Expressions Cookbook
-
2 years ago
0
Wersjonowanie semantyczne
PCRE (PHP <7.3)
a
Submitted by
https://semver.org/lang/ko/
-
2 years ago
0
Match CLI argument to
Java 8
Matches argumetn to as: -t to -t= ...
Submitted by
rperez-torro
-
2 years ago
0
Danish CPR number validation
PCRE (PHP <7.3)
CPR number is presented with or without a dash
Submitted by
anonymous
-
2 years ago
0
java-test1
Java 8
java test string
Submitted by
anonymous
-
2 years ago
0
Hitech RTOZONE
Java 8
Checks the registration number's validity
Submitted by
Sid
-
2 years ago
0
get arrays from Json
PCRE (PHP <7.3)
get arrays from Json
Submitted by
fawaz
-
2 years ago
0
Quiz Feed – Pages Only
PCRE (PHP <7.3)
The new quiz feed pages and its sub-feeds. i.e. /quizzes/foo
Submitted by
anonymous
-
2 years ago
0
Remove duplicate lines in sorted text
Java 8
See
Submitted by
@atnbueno
-
2 years ago
0
الرقم القومي المصري Egyptian National ID numer
PCRE (PHP <7.3)
استخراج المعلومات من الرقم القومي المصري لمعلومات اكثر رجاء زيارة: استخراج المعلومات من الرقم القومي المصري برمجياً
Submitted by
anonymous
-
2 years ago
0
ds100reg5
PCRE (PHP <7.3)
ds100reg5
Submitted by
anonymous
-
2 years ago
0
if else parser part 1
Java 8
A basic if else parser. It automatically captures the if equation and the result. It supports if, elif, and else statements. Note: for elif statements part 2 is required. This is because Regex can't use one group to capture multiple elif statements. Part 2 can be found here
Submitted by
Rubeste
-
2 years ago
0
if else parser part 2
Java 8
This is part 2 of my if else parser. Part 2 is only needed for elif statements. Note: From the elif result from part 1 add a #end to close the statement. I might change it a bit in the future so this isn't needed. ...
Submitted by
Rubeste
-
2 years ago
0
ISO 3166-1 alpha-3
Java 8
ISO 3166-1 alpha-3 countries for validation
Submitted by
anonymous
-
2 years ago
0
assoc_ff_solucao
PCRE (PHP <7.3)
identifies ff in assoc
Submitted by
anonymous
-
2 years ago
0
Strip Azure Devops merge commit for fit changelog
PCRE (PHP <7.3)
Using the right headerPattern that can correctly parse either the merge message or the commit message I was able to workaround the issue
Submitted by
anonymous
-
2 years ago
0
instagram regex url get shortcode all type url
PCRE (PHP <7.3)
Get shortcode from all type instagram url group 1 for username group 2 for p group 3 for reel group 4 for tv...
Submitted by
anubiskun
-
2 years ago
0
Match Strings itself
PCRE (PHP <7.3)
Match Strings itself, include ""
Submitted by
picc_lu
-
2 years ago
1
...
459
460
461
462
463
...
472
ip4/ip6 capture
-1
Regular Expression
PCRE (PHP <7.3)
/
(
(?'ip4'
(
\d
{1,3}
\.
){3}
\d
{1,3}
)
|
(?'ip6'
(
(
[
0
-
9a
-
f
]
{1,4}
)?
:
){7}
(
[
0
-
9a
-
f
]
{4}
)?
)
)
/
gm
Open regex in editor
Description
regex to capture ip4/ip6 addresses with named capture groups. The Following features are included:
PHP and python support
ip4 byte size check (ensures byte can't exceed 255)
ip6 checks if hex characters are valid
uses a negative lookbehind to check if the ip is a word on its own
named capture groups to facilitate extraction of either ip4 or ip6
Submitted by
Meryo
-
3 years ago