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
Quiz_6_Broken_Keyboard
PCRE2 (PHP >=7.3)
Oh no! It seems my friends spilled beer all over my keyboard last night and my keys are super sticky now. Some of the time whennn I press a key, I get two duplicates. Can you ppplease help me fix thhhis? Substitute with $1
Submitted by
anonymous
-
3 months ago
2
Quiz_14_Spam_filter
PCRE2 (PHP >=7.3)
Match a string that contains any of the following substrings: http://, www., porn, or credit card. But don't match the text if it contains one of: not allowed, filter, or mirc. Don't use word boundaries (anywhere in the text is fine). If you need help, try reading this.
Submitted by
anonymous
-
3 months ago
1
Quiz_5_Whitespace
PCRE2 (PHP >=7.3)
Find all occurrences of 4 or more whitespace characters in a row throughout the string.
Submitted by
anonymous
-
3 months ago
2
Quiz_15_Not_surrounded_by_digits
PCRE2 (PHP >=7.3)
Replace every . (dot) with a - (hyphen) except when the dot is surrounded by digits. E.g.: .a.b.1.2. should become -a-b-1.2-
Submitted by
anonymous
-
3 months ago
1
Quiz_4_Retrieve_Numbers
PCRE2 (PHP >=7.3)
Count the number of integers in a given string. Integers are, for example: 1, 2, 65, 2579, etc.
Submitted by
anonymous
-
3 months ago
2
Quiz_16_Repeated_Words
PCRE2 (PHP >=7.3)
I'd like to know if a text contains words with 4 characters or more which are repeated 3 or more times in the text (anywhere in the text). If so, set one (and only one) backreference for each word.
Submitted by
anonymous
-
3 months ago
1
Quiz_3_Uppercase_Consonants
PCRE2 (PHP >=7.3)
With regex you can count the number of matches. Can you make it return the number of uppercase consonants (B,C,D,F,..,X,Y,Z) in a given string? E.g.: it should return 3 with the text ABcDeFO!. Note: Only ASCII. We consider Y to be a consonant! Example: the regex /./g will return 3 when run against ...
Submitted by
anonymous
-
3 months ago
2
Quiz_17_Start_before_end
PCRE2 (PHP >=7.3)
Only match lines with the text start, unless text end appears prior to start. Note: end may or may not be in the string. Match start line_end; and don't match line_end; start
Submitted by
anonymous
-
3 months ago
1
Quiz_2_Capitalizing_I
PCRE2 (PHP >=7.3)
Use substitution to replace every occurrence of the word i with the word I (uppercase, I as in me). E.g.: i'm replacing it. am i not? -> I'm replacing it. am I not?. A regex match is replaced with the text in the Substitution field when using substitution.
Submitted by
anonymous
-
3 months ago
2
Quiz_1
PCRE2 (PHP >=7.3)
Check if a string contains the word word in it (case insensitive). If you have no idea, I guess you could try /word/.
Submitted by
anonymous
-
3 months ago
1
Template Includes regex
PCRE2 (PHP >=7.3)
Part of the templates library i'm building
Submitted by
anonymous
-
3 months ago
1
Secure Apache WordPress Root Directory
PCRE2 (PHP >=7.3)
Secure Apache WordPress Root Directory using your Apache vhost config file instead of .htaccess by using this RegEx for file-name exclusions' i.e. (wp-activate|wp-mail|wp-signup) and {wp-} for all WordPress root files' starting with {wp-}. Excluding wp-activate.php, wp-signup.php and wp-mail.php fr...
Submitted by
Scæntią
-
3 months ago
(Last modified 3 months ago)
1
Patentes chilenas con o sin guion
PCRE2 (PHP >=7.3)
AB-CD-12 AB-12-34 ABCD12 AB1234
Submitted by
Pablo
-
3 months ago
1
Patentes chilenas
PCRE2 (PHP >=7.3)
Validación de pantetes de automóviles en chile AB-CD-12 AB-12-34
Submitted by
Pablo
-
3 months ago
1
Direcciones
PCRE2 (PHP >=7.3)
Validación de direcciones en Chile
Submitted by
Pablo
-
3 months ago
1
RUT chileno
PCRE2 (PHP >=7.3)
Validación de formato de RUT chileno. Permite el punto en posiciones correctas. 15.000.000-9 ó 15000000-9
Submitted by
Pablo
-
3 months ago
1
Nombres
PCRE2 (PHP >=7.3)
Validación de nombres con todas las posibilidades de Chile.
Submitted by
Pablo
-
3 months ago
1
Search for markup elements with an attribute
ECMAScript (JavaScript)
In this example we are searching for all element/component in JSX that have the is="secondary" prop. This regex was tested with VS Code
Submitted by
anonymous
-
3 months ago
1
Basic CSS Parser
PCRE2 (PHP >=7.3)
This regex matches every name-value pair inside a line of inline CSS. It doesn't support CSS that contains string literals (such as content: "hello world";). Therefore, only use it on simple CSS that doesn't make use of attributes which take a string literal as its value. Parsing Rules Every occur...
Submitted by
A-Paint-Brush
-
3 months ago
1
Buscar fechas
PCRE2 (PHP >=7.3)
Buscar fechas
Submitted by
anonymous
-
3 months ago
1
...
4
5
6
7
8
...
902
Community Library Entry
0
Regular Expression
PCRE (PHP <7.3)
/
(?:
^\d
{1,4}
\s
{1}
)
(
\d
{1,2}
\s
{1}
)
(
\d
{1,4}
\s
{1}
)
(
\d
{1,4}
\s
{1}
)
(
\$
\s
{1}
\d
{0,3}
?
.
?
\d
{0,3}
?
.\d
{0,3}
\s
{1}
)?
(
\$
\s
{1}
\d
{0,3}
?
.
?
\d
{0,3}
?
.\d
{0,3}
\s
{1}
)?
(
\$
\s
{1}
\d
{0,3}
?
.
?
\d
{0,3}
?
.\d
{0,3}
\s
{1}
)?
(
\d
{1,4}
)?
/
gm
Open regex in editor
Description
no description available
Submitted by
anonymous
-
6 years ago