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*\.?\d*$
Description
Matches any floating point numer/numeric string, including optional sign character (+ or -). Also matches empty strings.
Matches
123 | +3.14159 | -3.14159
Non-Matches
abc | 3.4.5 | $99.95
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
Last.*?(\d+.?\d*)
Description
Plucks the last quote of a Stock from the MSN MoneyCentral WebQuote page for any given stock symbol. The URL of the web page where this RegEx should be applied is: http://localhost/asp/webquote.htm?ipage=qd&Symbol=,give the stock symbol here> You must also use the singleline option.
Matches
<TR><TD ALIGN=RIGHT> </TD><TD>Last</TD><TD ALIGN=RIGHT NOW
Non-Matches
[AADDSS]
Author Rating: Not yet rated. Prasad DV
Title Test Details Pattern Title
Expression
(\w+?@\w+?\x2E.+)
Description
Validates an email address
Matches
Non-Matches
[AABB]
Author Rating: The rating for this expression. Prasad DV
Title Test Details Pattern Title
Expression
^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$
Description
GUID Tester. It tests SQL Server GUIDs, which are alphanumeric characters grouped 8-4-4-4-12 (with the dashes). Make sure they don't have the brackets around them before you check them and have fun!
Matches
4D28C5AD-6482-41CD-B84E-4573F384BB5C | B1E1282C-A35C-4D5A-BF8B-7A3A51D9E388 | 91036A4A-A0F4-43F0-8CD
Non-Matches
{B1E1282C-A35C-4D3A-BF8B-7A3A51D9E388} | AAAAAAAAAAAAAAAAA | B;E1282C-A35C-4D3A-BF8B-7A3A51D9E38
Author Rating: Not yet rated. James Bray
Title Test Details Pattern Title
Expression
^([0-9]( |-)?)?(\(?[0-9]{3}\)?|[0-9]{3})( |-)?([0-9]{3}( |-)?[0-9]{4}|[a-zA-Z0-9]{7})$
Description
Matches US phone number format. 1 in the beginning is optional, area code is required, spaces or dashes can be used as optional divider between number groups. Also alphanumeric format is allowed after area code.
Matches
1-(123)-123-1234 | 123 123 1234 | 1-800-ALPHNUM
Non-Matches
1.123.123.1234 | (123)-1234-123 | 123-1234
Author Rating: The rating for this expression. Igor Kravtsov
Title Test Details Pattern Title
Expression
^[0,1]?\d{1}\/(([0-2]?\d{1})|([3][0,1]{1}))\/(([1]{1}[9]{1}[9]{1}\d{1})|([2-9]{1}\d{3}))$
Description
This expression checks the validity of a date (US, but it is easily editable for other format's). Year's 1990-9999, Month's 1 or 01 to 12, Day's 1 or 01 to 31. Still needs to have individual months added (i.e., Feb's 28 days), and some how to check for leap year...the months issue should not be to hard, but the leap year seems like a real chore. Please let me know if you have any suggestions for leap year.
Matches
01/01/1990 | 12/12/9999 | 3/28/2001
Non-Matches
3-8-01 | 13/32/1001 | 03/32/1989
Author Rating: The rating for this expression. Scott Watermasysk
Title Test Details Pattern Title
Expression
\d{4}-?\d{4}-?\d{4}-?\d{4}
Description
Major credit card validator. Only checks that the format is 16 digits (optionally separated by hyphens), not the value of any of the digits.
Matches
1234-1234-1234-1234 | 1234123412341234
Non-Matches
1234123412345
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
[\w-]+@([\w-]+\.)+[\w-]+
Description
Yet another simple email validator expression.
Matches
Non-Matches
asdf | 1234
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
((\(\d{3}\) ?)|(\d{3}-))?\d{3}-\d{4}
Description
US Phone Number -- doesn't check to see if first digit is legal (not a 0 or 1).
Matches
(123) 456-7890 | 123-456-7890
Non-Matches
1234567890
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^\s*[a-zA-Z,\s]+\s*$
Description
Any Expression Upper/Lower Case, with commas and space between the text, with any amount of space before or after
Matches
Smith, Ed | Ed Smith | aBcDeFgH
Non-Matches
a123 | AB5 | Mr. Ed
Author Rating: Not yet rated. Mart Maasikas
Title Test Details Pattern Title
Expression
^([0-1][0-9]|[2][0-3]):([0-5][0-9])$
Description
Matches a string if it is a valid time in the format of HH:MM
Matches
02:04 | 16:56 | 23:59
Non-Matches
02:00 PM | PM2:00 | 24:00
Author Rating: Not yet rated. Koen Hoorelbeke
Title Test Details Pattern Title
Expression
^\d{5}-\d{4}|\d{5}|[A-Z]\d[A-Z] \d[A-Z]\d$
Description
This expression matches three different formats of postal codes: 5 digit US ZIP code, 5 digit US ZIP code + 4, and 6 digit alphanumeric Canadian Postal Code. The first one must be 5 numeric digits. The ZIP+4 must be 5 numeric digits, a hyphen, and then 4 numeric digits. The Canadian postal code must be of the form ANA NAN where A is any uppercase alphabetic character and N is a numeric digit from 0 to 9.
Matches
44240 | 44240-5555 | G3H 6A3
Non-Matches
Ohio | abc | g3h6a3
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^[2-9]\d{2}-\d{3}-\d{4}$
Description
This expression matches a hyphen separated US phone number, of the form ANN-NNN-NNNN, where A is between 2 and 9 and N is between 0 and 9.
Matches
800-555-5555 | 333-444-5555 | 212-666-1234
Non-Matches
000-000-0000 | 123-456-7890 | 2126661234
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$
Description
This expression matches email addresses, and checks that they are of the proper form. It checks to ensure the top level domain is between 2 and 4 characters long, but does not check the specific domain against a list (especially since there are so many of them now).
Matches
Non-Matches
a@b | notanemail | joe@@.
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
^[12345]$
Description
This matches a single numeric digit between 1 and 5, and is the same as saying ^[1-5]$.
Matches
1 | 2 | 4
Non-Matches
6 | -1 | abc
Author Rating: Not yet rated. Steven Smith
Title Test Details Pattern Title
Expression
^[1-5]$
Description
This matches a single numeric digit between 1 and 5, and is the same as saying ^[12345]$.
Matches
1 | 3 | 4
Non-Matches
6 | 23 | a
Author Rating: The rating for this expression. Steven Smith
Title Test Details Pattern Title
Expression
foo
Description
The "hello world" of regular expressions, this will match any string with an instance of 'foo' in it.
Matches
foo
Non-Matches
bar
Author Rating: The rating for this expression. Steven Smith
Title Test Details Date With Slashes
Expression
^\d{1,2}\/\d{1,2}\/\d{4}$
Description
This regular expressions matches dates of the form XX/XX/YYYY where XX can be 1 or 2 digits long and YYYY is always 4 digits long.
Matches
4/1/2001 | 12/12/2001 | 55/5/3434
Non-Matches
1/1/01 | 12 Jan 01 | 1-1-2001
Author Rating: The rating for this expression. Steven Smith
Title Test Details Email - Overly Simple
Expression
^\w+@[a-zA-Z_]+?\.[a-zA-Z]{2,3}$
Description
Simple email expression. Doesn't allow numbers in the domain name and doesn't allow for top level domains that are less than 2 or more than 3 letters (which is fine until they allow more). Doesn't handle multiple "." in the domain ([email protected]).
Matches
Non-Matches
Author Rating: The rating for this expression. Steven Smith
Title Test Details Strongish Password
Expression
^[a-zA-Z]\w{3,14}$
Description
The password's first character must be a letter, it must contain at least 4 characters and no more than 15 characters and no characters other than letters, numbers and the underscore may be used
Matches
abcd | aBc45DSD_sdf | password
Non-Matches
afv | 1234 | reallylongpassword
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