RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Advanced Search

Keywords

Category

Minimum Rating

Results per Page

Search Results: 4128 regular expressions found.

Change page:   |    Displaying page 1 of 207 pages; Items 1 to 20
Title Test Details Pattern Title
Expression
^(?=.*\d).{4,8}$
Description
Password expression. Password must be between 4 and 8 digits long and include at least one numeric digit.
Matches
1234 | asdf1234 | asp123
Non-Matches
asdf | asdf12345 | password
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$
Description
Password matching expression. Password must be at least 4 characters, no more than 8 characters, and must include at least one upper case letter, one lower case letter, and one numeric digit.
Matches
asD1 | asDF1234 | ASPgo123
Non-Matches
asdf | 1234 | ASDF12345
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])$
Description
RegExp for validating the format of IP Addresses. This works great with the ASP.NET RegularExpressionValidator server control.
Matches
127.0.0.1 | 255.255.255.0 | 192.168.0.1
Non-Matches
1200.5.4.3 | abc.def.ghi.jkl | 255.foo.bar.1
Author Rating: The rating for this expression. G. Andrew Duthie
Title Test Details Pattern Title
Expression
(\w+)\s+\1
Description
This expression uses a BackReference to find occurrences of the same word twice in a row (separated by a space). Matches things like 'mandate dated', which may not be desirable. See Sean Carley's update for a better expression for true repeated word matching.
Matches
hubba hubba | mandate dated | an annual
Non-Matches
may day | gogo | 1212
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
\(([0-9]{2}|0{1}((x|[0-9]){2}[0-9]{2}))\)\s*[0-9]{3,4}[- ]*[0-9]{4}
Description
Match diferent styles for brazilian Phone number code. Only DDD (12), complete DDD (012), complete DDD + Telephony Company (0xx12) plus 3 or 4 digits (city code) plus 4 digits (phone number).
Matches
(12) 123 1234 | (01512) 123 1234 | (0xx12) 1234 1234
Non-Matches
12 123 1234 | (012) 123/1234 | (012) 123 12345
Author Rating: The rating for this expression. Samuel Mota
Title Test Details Pattern Title
Expression
^\w+[\w-\.]*\@\w+((-\w+)|(\w*))\.[a-z]{2,3}$
Description
Email validation. With this short expression you can validate for proper email format. It's short and accurate.
Matches
Non-Matches
Author Rating: The rating for this expression. Eric Lebetsamer
Title Test Details Pattern Title
Expression
^#?([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$
Description
Tests for valid HTML hexadecimal color codes. The # symbol is optional. And it will except either the 3 digit form for the 216 Web safe colors, or the full 6 digit form. I am use it on my site to allow users to customize the site's colors.
Matches
#00ccff | #039 | ffffcc
Non-Matches
blue | 0x000000 | #ff000
Author Rating: The rating for this expression. Chris Craft
Title Test Details Pattern Title
Expression
^[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$
Description
Matches UK postcodes according to the following rules 1. LN NLL eg N1 1AA 2. LLN NLL eg SW4 0QL 3. LNN NLL eg M23 4PJ 4. LLNN NLL eg WS14 0JT 5. LLNL NLL eg SW1N 4TB 6. LNL NLL eg W1C 8LQ Thanks to Simon Bell for informing me of LNL NLL rule for postcodes which I had omitted in an earlier version.
Matches
G1 1AA | EH10 2QQ | SW1 1ZZ
Non-Matches
G111 1AA | X10 WW | DDD 5WW
Author Rating: Not yet rated. Dave Sparks
Title Test Details Pattern Title
Expression
^[\w\.=-]+@[\w\.-]+\.[\w]{2,3}$
Description
Much simpler email expression. This one forces a length of 2 or 3, which fits current specs, but you may need to alter the end as this one allows all numerals on the .COM section.
Matches
Non-Matches
word | word@ | @word
Author Rating: The rating for this expression. Gregory Beamer
Title Test Details Pattern Title
Expression
/\*[\d\D]*?\*/
Description
If you need to extract or remove any /* */ sytle comments from any Java, JavaScript, C, C++, CSS, etc code you have this regular expression can help.
Matches
/* my comment */ | /* my multiline comment */ | /* my nested comment */
Non-Matches
*/ anything here /* | anything between 2 seperate comments | \* *\
Author Rating: The rating for this expression. Chris Craft
Title Test Details Pattern Title
Expression
^\$[0-9]+(\.[0-9][0-9])?$
Description
Validates a dollar amount including a dollar sign and 2 decmals. The decimal and cents are optional.
Matches
$1.50 | $49 | $0.50
Non-Matches
1.5 | $1.333 | this $5.12 fails
Author Rating: Not yet rated. Bob Levittan
Title Test Details Pattern Title
Expression
\b(([01]?\d?\d|2[0-4]\d|25[0-5])\.){3}([01]?\d?\d|2[0-4]\d|25[0-5])\b
Description
Most Concise RegExp for matching Decimal IPs. If nothing else, it'll make your code easier to read. (And I know that \d?\d is \d{1,2} but that's 2 extra characters.) --Update: darkone noticed 8 characters could be shaved down. I've edited it to reflect this. Thanks, darkone!
Matches
217.6.9.89 | 0.0.0.0 | 255.255.255.255
Non-Matches
256.0.0.0 | 0978.3.3.3 | 65.4t.54.3
Author Rating: The rating for this expression. Sean Schricker
Title Test Details Pattern Title
Expression
(AUX|PRN|NUL|COM\d|LPT\d)+\s*$
Description
"Be careful when opening or creating files by using Scripting File System Object. If the filename is based on the user's input, the user might attempt to open a serial port or printer."
Matches
COM1 | AUX | LPT1
Non-Matches
image.jpg | index.html | readme.txt
Author Rating: Not yet rated. Chris Craft
Title Test Details Pattern Title
Expression
^(user=([a-z0-9]+,)*(([a-z0-9]+){1});)?(group=([a-z0-9]+,)*(([a-z0-9]+){1});)?(level=[0-9]+;)?$
Description
This re was used for a security routine. The format is: [user=name1,name2,...,nameN;][group=group1,group2,...,groupN;][level=number;] Each component is optional, but they must appear the in order listed if applicable.
Matches
user=foo,bar,quux;group=manager,admin;level=100; | group=nobody;level=24;
Non-Matches
user=foo | blahh
Author Rating: Not yet rated. Michael Scovetta
Title Test Details Pattern Title
Expression
^\D?(\d{3})\D?\D?(\d{3})\D?(\d{4})$
Description
This RegEx requires a US phone number WITH area code. It is written to all users to enter whatever delimiters they want or no delimiters at all (i.e. 111-222-3333, or 111.222.3333, or (111) 222-3333, or 1112223333, etc...).
Matches
(111) 222-3333 | 1112223333 | 111-222-3333
Non-Matches
11122223333 | 11112223333 | 11122233333
Author Rating: The rating for this expression. Laurence O'Donnell
Title Test Details Pattern Title
Expression
^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$
Description
This pattern allows standard e-mail addresses (e.g. [email protected]), sub domains (e.g. [email protected]), the new two- and four-letter domains (e.g. [email protected] and [email protected]) and country codes (e.g. [email protected]). Also, this patter follows the Network Solutions standard length of 67 characters for top-level domains. The reason I allow numbers to be entered in the domain suffix is for future planning. If you do not want numbers to be able to be added as a domain suffix (e.g. [email protected]), simply delete the last two occurrences of "\d".
Matches
Non-Matches
Author Rating: Not yet rated. Laurence O'Donnell
Title Test Details Pattern Title
Expression
^(\d{4}[- ]){3}\d{4}|\d{16}$
Description
Credit card validator. Just checks that the format is either 16 numbers in groups of four separated by a "-" or a " " or nothing at all.
Matches
1234-1234-1234-1234 | 1234 1234 1234 1234 | 1234123412341234
Non-Matches
Visa | 1234 | 123-1234-12345
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^((4\d{3})|(5[1-5]\d{2})|(6011))-?\d{4}-?\d{4}-?\d{4}|3[4,7]\d{13}$
Description
Matches major credit cards including: Visa (length 16, prefix 4), Mastercard (length 16, prefix 51-55), Discover (length 16, prefix 6011), American Express (length 15, prefix 34 or 37). All 16 digit formats accept optional hyphens (-) between each group of four digits.
Matches
6011-1111-1111-1111 | 5423-1111-1111-1111 | 341111111111111
Non-Matches
4111-111-111-111 | 3411-1111-1111-111 | Visa
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^.{4,8}$
Description
Matches any string between 4 and 8 characters in length. Limits the length of a string. Useful to add to password regular expressions.
Matches
asdf | 1234 | asdf1234
Non-Matches
asd | 123 | asdfe12345
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^\d*$
Description
Accepts an unsigned integer number. Also matches empty strings.
Matches
123 | 000 | 43
Non-Matches
asbc | -34 | 3.1415
Author Rating: Not yet rated. Steven Smith
Change page:   |    Displaying page 1 of 207 pages; Items 1 to 20

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials