Please enable JavaScript to use regex101
Regular
Expressions
101
Support Regex101
Social
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Order By
Most Recent
Most upvotes
Most downvotes
Highest Score
Lowest Score
Filter by Flavor
PCRE2 (PHP)
JavaScript
Python
Golang
Java
.NET 7.0 (C#)
Rust
PCRE (Legacy)
Sponsors
Learn to code interactively with bite-sized, hands-on programming challenges.
Community Patterns
Search among community submitted regex patterns...
0/512
107
ECMAScript/JavaScript trim
Created
·
2013-09-10 08:21
Updated
·
2024-09-19 14:38
Flavor
·
JavaScript
Trim leading and trailing whitespace from a string.
Submitted by
fp
73
Regex for telephone numbers all over the world
Created
·
2014-04-08 07:58
Updated
·
2023-10-09 14:47
Flavor
·
JavaScript
Recommended
·
Detects most of the phone numbers all over the world
Submitted by
Aditya Joshi
87
Password Validation
Created
·
2015-07-08 18:46
Flavor
·
JavaScript
Checks that a password has a minimum of 6 characters, at least 1 uppercase letter, 1 lowercase letter, and 1 number with no spaces.
Submitted by
Christian Klemp
6
Password
Created
·
2013-12-06 14:02
Updated
·
2023-07-21 04:59
Flavor
·
JavaScript
no description available
Submitted by
anonymous
31
Email address (most used)
Created
·
2015-07-01 09:32
Flavor
·
JavaScript
Email address, most used cases
Submitted by
Jago
36
Google like regex
Created
·
2014-05-12 13:35
Flavor
·
JavaScript
Attempts to mimic Google search box behavior, returning an array with the separated search strings (that keep the +/- indicator for following operations)
Submitted by
mettjus
14
Phone Number
Created
·
2015-08-11 17:07
Flavor
·
JavaScript
Allows phone numbers with optional country code, optional special characters and whitespace
Submitted by
Tlmader
16
Password
Created
·
2015-04-28 16:49
Flavor
·
JavaScript
Safe Password that allow only with a number, a lowercase, a uppercase, and a special character
Submitted by
davidlondono
16
http url regex
Created
·
2015-06-21 19:49
Flavor
·
JavaScript
general purpose HTTP URL regex
Submitted by
Miguel Castillo @manchagnu
25
Quote Macthing with escape
Created
·
2015-05-10 20:48
Flavor
·
JavaScript
Matches text within quotes (", ') and escapes the charecters.
Submitted by
Vihan Bhargava
37
Strict Password Validator
Created
·
2018-01-31 01:03
Updated
·
2023-07-19 15:28
Flavor
·
JavaScript
This regex matches only when all the following are true: password must contain 1 number (0-9) password must contain 1 uppercase letters password must contain 1 lowercase letters password must contain 1 non-alpha numeric number password is 8-16 characters with no space
Submitted by
qho
7
Date validation
Created
·
2015-07-24 11:21
Flavor
·
JavaScript
Besides leap year handling, this takes care of date validation in the yy-mm-dd format.
Submitted by
anonymous
24
grab valid css rules and properties
Created
·
2015-06-03 19:17
Flavor
·
JavaScript
no description available
Submitted by
Pavel Dominguez
12
Full name (Turkish)
Created
·
2014-09-29 13:31
Flavor
·
JavaScript
Matches case insensitive first name, optional unlimited number of middle names and last name separated with space format. Replaced \w with explicit char range for Turkish support. (Äž accepted as first char not to over complex)
Submitted by
CKK
6
Simple Number
Created
·
2015-10-20 16:06
Flavor
·
JavaScript
Verifies Number is a negative/positive number. Number may be a decimal, but if it is, it requires at least one number before and after the decimal place. Decimal numbers may also be negative or positive. Only 1 decimal place is allowed.
Submitted by
David P Smith
4
url
Created
·
2015-07-23 21:43
Flavor
·
JavaScript
no description available
Submitted by
anonymous
16
Hashtag
Created
·
2014-10-05 17:14
Flavor
·
JavaScript
The secret of the Twitterverse.
Submitted by
Joogl
12
Username with "_" "-"
Created
·
2015-10-16 15:44
Flavor
·
JavaScript
no description available
Submitted by
Gianvy
7
Match text (not within html tag)
Created
·
2015-05-12 12:38
Flavor
·
JavaScript
no description available
Submitted by
Moistly
16
us postal/zip
Created
·
2014-01-13 22:15
Flavor
·
JavaScript
no description available
Submitted by
jay johnson
7
if, else if, else condtion match
Created
·
2014-10-20 13:50
Flavor
·
JavaScript
matches full if condition statment eg: if(condition){ ... } else if(condition){ ... }else{ ... }
Submitted by
Ivan Jakesevic
16
CSS Color Matcher
Created
·
2023-08-07 02:36
Flavor
·
JavaScript
Pattern matching and extracting color code formats using RegEx. https://github.com/Kyza/color-regex/
Submitted by
Kyza
14
Email regex validation
Created
·
2019-03-17 21:49
Updated
·
2023-07-27 21:03
Flavor
·
JavaScript
RegEx email /^((?!\.)[\w-_.]*)(@\w+)(\.\w+(\.\w+)?)$/gim; Just playing with Reg Ex. This to validate emails in following ways The email couldn't start or finish with a dot The email shouldn't contain spaces into the string The email shouldn't contain special chars ( mailname@domain.com First group takes the first string with the name of email \$1 => (mailname) Second group takes the @ plus the domain: \$2 => (@domain) Third group takes the last part after the domain : \$3 => (.com)
Submitted by
https://www.linkedin.com/in/peralta-steve-atileon/
0
Name
Created
·
2015-06-04 14:55
Flavor
·
JavaScript
Simple name matching Matches english names only, you may add international characters to list of characters.
Submitted by
Ehsan
13
Credit Card Expiry Date
Created
·
2015-05-26 05:34
Flavor
·
JavaScript
Allows inserting expiry date as MM/YYYY or MM-YYYY format
Submitted by
Rider
7
simple common lisp tokenizer
Created
·
2015-03-10 16:24
Flavor
·
JavaScript
main symbols and comments are supported
Submitted by
d4rw1n1s7@gmail.com
11
html color match: transparent, #fff, #123456, rgb, rgba, hsl, hsla
Created
·
2014-12-17 13:00
Flavor
·
JavaScript
This may be useful or not to test whether a given string is a valid (more or less) html color value. It matches color values such as: #123 - short hex color value #123456 - hex color value rgb(255,255,0) - rgb color value rgba(255,255,0,1.0) - rgba color value hsl(360,100%,100%) - hsl color value hsla(360,100%,100%,0.5334) - hsla color value Regex allows whitespaces between i.e. rgb and (, also between numbers and commas, but not in value like 55% between number and percentage. To change this behaviour simply remove \s*? from appriopriate places.
Submitted by
grouch
13
US Currency Format
Created
·
2016-01-23 17:46
Flavor
·
JavaScript
no description available
Submitted by
anonymous
11
find all link(<a>) tags expect your links in href attribute
Created
·
2015-07-29 11:09
Flavor
·
JavaScript
YourLink - not found AnotherLink - found
Submitted by
KoT
7
split URL into location-resource-params (JavaScript)
Created
·
2014-05-22 17:18
Flavor
·
JavaScript
Extract resource location, name and query parameters from a URL (JavaScript version)
Submitted by
cebence
2
Replace \n by <br />
Created
·
2014-03-27 08:56
Flavor
·
JavaScript
Replace non-ending string \n by the HTML tag
Submitted by
anonymous
10
Valid Telephone Number
Created
·
2015-12-09 01:04
Flavor
·
JavaScript
This regex validates varying types of telephone numbers.
Submitted by
Adam Recvlohe
10
RFC 3987 compliant URL regex
Created
·
2015-06-24 14:07
Flavor
·
JavaScript
This is a JavaScript port of the URL regex from http://stackoverflow.com/a/190405/384062 that includes a bug fix and some optimization. Mathias Bynens's Regenerate was used to convert unicode escapes. Bug fix: Eliminated stray | falsely allowing querystring to contain | Optimization: Merged alternated character classes in querystring and fragment identifier portions for better performance.
Submitted by
Hans Meyer
9
money: either 0 or 2 dp
Created
·
2015-11-18 19:34
Flavor
·
JavaScript
no description available
Submitted by
anonymous
6
Email with + symbol
Created
·
2015-09-14 18:06
Flavor
·
JavaScript
email that accepts the plus (+) symbol
Submitted by
luckcheese
9
youtube url match
Created
·
2015-08-19 03:04
Flavor
·
JavaScript
extract video id, index, play list id from youtube url
Submitted by
anonymous
5
MAC address
Created
·
2015-07-31 17:12
Flavor
·
JavaScript
a mac address separated by dashes or colons.
Submitted by
anonymous
5
Youtube ID matcher
Created
·
2013-09-29 00:48
Flavor
·
JavaScript
Credit: https://gist.github.com/FinalAngel/1876898
Submitted by
anonymous
5
password 1upper 1lower 1number 1specialcharater
Created
·
2016-01-23 03:48
Flavor
·
JavaScript
fjk@1Qaa$
Submitted by
Anuswadh
5
HTML img
Created
·
2015-10-17 05:48
Flavor
·
JavaScript
Grabs all HTML tags
Submitted by
Pirate11
10
IP Address (with 0s)
Created
·
2015-09-28 21:24
Flavor
·
JavaScript
Matches all valid IP addresses from 0.0.0.0 to 255.255.255.255
Submitted by
Ryan Plummer
6
search word with an accent
Created
·
2015-08-04 08:06
Flavor
·
JavaScript
search any word with an accent
Submitted by
Thegner Pierre
5
Accept url without www
Created
·
2014-01-10 05:30
Flavor
·
JavaScript
no description available
Submitted by
anonymous
7
Split quotes and single words
Created
·
2013-12-29 18:41
Flavor
·
JavaScript
Find " and ' quoted strings and "orphaned"/single words in a string
Submitted by
LoveIsGrief
7
Date and time format - ISO 8601
Created
·
2016-02-03 08:21
Flavor
·
JavaScript
Matches ISO 8601 date formats
Submitted by
Ettienne
2
Date validator for mm/dd/yy
Created
·
2014-09-23 08:08
Flavor
·
JavaScript
no description available
Submitted by
Dheeraj Khushalani - dotnetguy.net
3
HTML image tag src
Created
·
2013-10-08 17:29
Flavor
·
JavaScript
Capture src attribute of HTML image tags
Submitted by
Simon Altschuler
4
Full e-mail validator
Created
·
2015-08-03 12:07
Flavor
·
JavaScript
no description available
Submitted by
anonymous
0
Number with two max possible decimals
Created
·
2015-03-09 13:40
Flavor
·
JavaScript
For float type inputs.
Submitted by
Juanma - https://github.com/juanmaa1414
4
Capturing items from multiple lists using a single regex
Created
·
2014-10-21 15:19
Flavor
·
JavaScript
no description available
Submitted by
anonymous
Load More
Community Library Entry
0
Regular Expression
Created
·
2015-06-19 12:23
Flavor
·
PCRE (Legacy)
/
[
123
]
+
(
123
)*
2
/
Open regex in editor
Description
/[123]+(123)*2/ Input: 1,2,3,4,5,6,7,8,9,0,10,11,12,13,14,15,16 Find: 12
Submitted by
Tomer Levi