Displaying page
of
pages;
Items to
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:
Samuel Mota
|
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:
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:
G. Andrew Duthie
|
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 |
^(?=.*\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:
Steven Smith
|
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:
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:
Chris Craft
|
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>&nbsp;</TD><TD>Last</TD><TD ALIGN=RIGHT NOW |
Non-Matches |
[AADDSS] |
Author |
Rating:
Not yet rated.
Prasad DV
|
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:
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:
Scott Watermasysk
|
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 |
\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:
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:
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 |
^([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 |
^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$ |
Description |
Domain names:
This regular expression tests the validity of a domain or hostname. It will match any valid domain name that does not contain characters which are invalid in URLs, and which ends in .com, .org, .net, .mil, or .edu. You can add additional valid TLDs by appending the | (pipe) character and the desired TLD to the list in the parens. |
Matches |
3SquareBand.com | asp.net | army.mil |
Non-Matches |
$SquareBand.com | asp/dot.net | army.military |
Author |
Rating:
Not yet rated.
G. Andrew Duthie
|
Title |
Test
Details
Pattern Title
|
Expression |
^\d*\.?\d*$ |
Description |
Matches any unsigned floating point number/numeric string. Also matches empty strings. |
Matches |
123 | 3.14159 | .234 |
Non-Matches |
abc | -3.14159 | 3.4.2 |
Author |
Rating:
Not yet rated.
Steven Smith
|
Title |
Test
Details
Pattern Title
|
Expression |
^[-+]?\d*$ |
Description |
Matches any integer number or numeric string, including positive and negative value characters (+ or -). Also matches empty strings. |
Matches |
123 | -123 | +123 |
Non-Matches |
abc | 3.14159 | -3.14159 |
Author |
Rating:
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
|
Displaying page
of
pages;
Items to