Regular Expressions 101

@regex101
Donate
Sponsor
Contact
Bug Reports & Feedback
Wiki
Whats new?

Library entries

0
pcre2
Submitted by anonymous - 4 hours ago

Dup words

no description available
1
pcre2
Submitted by anonymous - 4 hours ago

Dutch zipcodes

no description available
1
pcre2
Submitted by anonymous - 4 hours ago

Dutch mobile phone number

no description available
0
pcre
Submitted by anonymous - 7 hours ago

Url regex

no description available
0
pcre
Submitted by anonymous - 8 hours ago

aaa

no description available
0
pcre2
Submitted by anonymous - 13 hours ago

Aplayer Icons Regex

no description available
0
pcre2
Submitted by anonymous - 14 hours ago

cisco command

no description available
0
pcre2
Submitted by Habibi Mustafa - 16 hours ago

Minify HTML

Remove Whitespace Remove Comment
0
pcre2
Submitted by anonymous - 17 hours ago

get main content if has :

no description available
0
pcre2
Submitted by anonymous - 17 hours ago

get number from string

no description available
0
python
Submitted by anonymous - 20 hours ago

conditional phone numbers

no description available
0
pcre2
Submitted by AiAbdrahim - 20 hours ago

Email

A valid Email
0
pcre2
Submitted by AiAbdrahim - 20 hours ago

Email

no description available
0
pcre2
Submitted by anonymous - 20 hours ago

URL

This pattern can detect URLs.
0
pcre2
Submitted by Alan Nevill - a day ago

AOC 2020 day 18

no description available
0
pcre2
Submitted by anonymous - a day ago

Sagitta - LTEPIC

no description available

html color match: transparent, #fff, #123456, rgb, rgba, hsl, hsla

Regular Expression
javascript

/
^(rgb\s*?\(\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?\))$|^(rgba\s*?\(\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(0|0\.\d*|1|1.0*)\s*?\))$|^(transparent)$|^(#([a-fA-F0-9]){3})$|^(#([a-fA-F0-9]){6}$)|(^hsl\s*?\(\s*?(000|0?\d{1,2}|[1-2]\d\d|3[0-5]\d|360)\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?\)$)|(^hsla\s*?\(\s*?(000|0?\d{1,2}|[1-2]\d\d|3[0-5]\d|360)\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?,\s*?(0|0\.\d*|1|1.0*)\s*?\)$)$
/

Description

Loading markdown...
Submitted by grouch - 6 years ago