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 13,040 community submitted regex patterns...
1
Is Sentence Correct
ECMAScript (JavaScript)
it starts with a capital letter; it ends with a full stop, question mark or exclamation point ('.', '?' or '!'); full stops, question marks and exclamation points don't appear anywhere else in the sentence.
Submitted by
Hafiz
-
3 years ago
1
match x or y but not if z is present in a string
PCRE (PHP <7.3)
matches one or two words but excludes the string if a 3rd word is present
Submitted by
Pushpesh Kumar Rajwanshi
-
3 years ago
1
css @media match - not complete -
ECMAScript (JavaScript)
css @media match - not complete -
Submitted by
anonymous
-
3 years ago
1
Match all words starting with "a" not in a Tag
ECMAScript (JavaScript)
Match all words that are not in a tag. Non-matching do not prevent matches. But fails to match terms between if no intervening
Submitted by
Michael Chambers
-
3 years ago
1
Custom Array Type Declaration Finder
ECMAScript (JavaScript)
This Regex can be used to find the custom array types in jsdoc typdefs
Submitted by
pranomvignesh
-
3 years ago
1
How do i use regex in google data studio to extract text between two characters?
ECMAScript (JavaScript)
For Mike Griffin
Submitted by
anonymous
-
3 years ago
1
Username Validation
ECMAScript (JavaScript)
Super simple, just checks for 5 or more letters/numbers/symbols.
Submitted by
Ryan Varley
-
3 years ago
(Last modified 3 years ago)
1
URL check
ECMAScript (JavaScript)
What it does? The `RegExp tries to test if a url is valid or not according to Guildness for URL Display
Submitted by
javalsai
-
3 years ago
1
selects Bengali text
ECMAScript (JavaScript)
This selects Bengali using the script tag. It works in Javascript, using: text.split(/+/ug) or text.match(/[\p{Script=Bengali}]+/ug) This Regex was provided by Peter Seliger
Submitted by
anonymous
-
3 years ago
1
Phone Number Selector
ECMAScript (JavaScript)
Select a Phone Number with +98 or 0
Submitted by
Amir Hossein Khateri
-
3 years ago
1
lsblk-output-regex
Golang
Trying to adapt this regex to support LVM.
Submitted by
anonymous
-
3 years ago
1
Absolute File Path Validation
ECMAScript (JavaScript)
Matches absolute file paths, such as C:\Users\username\Documents\filename.txt The path must contain a file and extension at the end
Submitted by
anonymous
-
3 years ago
1
yyyy/mm/dd
Golang
^(((\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 format. e.g: 2020/02/29 [match] 2021/02/29 ...
Submitted by
mayl0421
-
3 years ago
1
Div shortcode [div]..[/div]
ECMAScript (JavaScript)
Converts the markdown shortcode for the dive element to the regular HTML: Example shortcode: [div id="bla" class="ups"]some multiple line text[/div]
Submitted by
Dux Linux
-
3 years ago
1
Find last occurrence of char in a string
ECMAScript (JavaScript)
Find last occurrence of . can be replaced with anything .
Submitted by
Volgers
-
3 years ago
1
Word wrap text
PCRE (PHP <7.3)
(Directly inspired by https://macromates.com/blog/2006/wrapping-text-with-regular-expressions/ ) This version only splits between words, so lines may wrap earlier than the given maximum. Passes existing linefeed through "as‐is", so probably not useful for reflowing already wrapped text
Submitted by
Tristan
-
3 years ago
1
Remove single, but not repeating newlines, except immediately after a period. (xiTWA2/1)
PCRE (PHP <7.3)
Intended as a first pass on already word wrapped text, to remove wrap newlines while preserving likely intentional ones. Not especially robust.
Submitted by
Tristan
-
3 years ago
1
Youtube video URL or empty
ECMAScript (JavaScript)
Matches correct youtube video urls and empty strings.
Submitted by
xeon927 on stackoverflow
-
3 years ago
1
RegEx Workshop
ECMAScript (JavaScript)
Phone Number RegEx
Submitted by
Anthony Cooper
-
3 years ago
1
Add rgb for colour variables
ECMAScript (JavaScript)
Add rgb for colour variables
Submitted by
anonymous
-
3 years ago
1
...
581
582
583
584
585
...
652
Community Library Entry
1
Regular Expression
ECMAScript (JavaScript)
/
The
puctuation
character
in
the
ASCII
table
are:
!"#
\$
%&'
\(\)\*\+
,-
\.\/
:;<=>
\?
@
\[\\
]
\^
_`
\{\|
}~
/
gm
Open regex in editor
Description
Regular Expressions Cookbook 2.1 Match Literal Text Example
Submitted by
hong
-
3 years ago