Displaying page
of
pages;
Items to
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]{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+[\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 |
^([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 |
^\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 |
^[a-zA-Z0-9\s.\-]+$ |
Description |
ANY alphanumeric string with spaces, commas, dashes. |
Matches |
2222 Mock St. | 1 A St. | 555-1212 |
Non-Matches |
[A Street] | (3 A St.) | {34 C Ave.} |
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 |
^[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 |
((\(\d{3}\)?)|(\d{3}))([\s-./]?)(\d{3})([\s-./]?)(\d{4}) |
Description |
US Phone number that accept a dot, a space, a dash, a forward slash, between the numbers. Will Accept a 1 or 0 in front. Area Code not necessary |
Matches |
1.2123644567 | 0-234.567/8912 | 1-(212)-123 4567 |
Non-Matches |
0-212364345 | 1212-364,4321 | 0212\345/6789 |
Author |
Rating:
Not yet rated.
Mart Maasikas
|
Title |
Test
Details
Pattern Title
|
Expression |
\[link="(?<link>((.|\n)*?))"\](?<text>((.|\n)*?))\[\/link\] |
Description |
This can be used in conjunction with the replace method to provide pseudo-code support without having to enable HTML. The replacement string (in ASP.NET, use RegExp.Replace(SourceString, RegularExpressionPattern, ReplacementString) is <a href="${link}">${text}</a>. |
Matches |
[link="http://www.yahoo.com"]Yahoo[/link] |
Non-Matches |
[link]http://www.yahoo.com[/link] | [link=http://www.yahoo.com]Yahoo[/link] |
Author |
Rating:
Not yet rated.
Ryan S
|
Title |
Test
Details
Pattern Title
|
Expression |
[0-9]{4}\s*[a-zA-Z]{2} |
Description |
Dutch zip code expression
4 numbers - space yes/no - 2 letters
|
Matches |
1054 WD | 1054WD | 1054 wd |
Non-Matches |
10543 |
Author |
Rating:
Not yet rated.
Roland Mensenkamp
|
Title |
Test
Details
Pattern Title
|
Expression |
(^1300\d{6}$)|(^1800|1900|1902\d{6}$)|(^0[2|3|7|8]{1}[0-9]{8}$)|(^13\d{4}$)|(^04\d{2,3}\d{6}$) |
Description |
Australian phone numbers: Matches all known formats incl normal 10-digit landline numbers (valid area code mandatory) 13, 1300, 1800, 1900, 1902 plus mobile 10 and 11-digit formats. Use a Replace function first to remove non-numerics which are probably separators (E.g. newNum = number.replace(/[\D]/g, &quot;&quot;). Please contact me if you find any valid Aussie numbers being rejected. |
Matches |
0732105432 | 1300333444 | 131313 |
Non-Matches |
32105432 | 13000456 |
Author |
Rating:
Bill Hely
|
Title |
Test
Details
Pattern Title
|
Expression |
^([0-9]{6}[\s\-]{1}[0-9]{12}|[0-9]{18})$ |
Description |
This regular expression matches 'Switch' card numbers - a payment method used extensively in the UK. |
Matches |
000000 000000000000 | 000000-000000000000 | 000000000000000000 |
Non-Matches |
000000_000000000000 |
Author |
Rating:
Not yet rated.
Scott Frampton
|
Title |
Test
Details
Pattern Title
|
Expression |
^(([1-9])|(0[1-9])|(1[0-2]))\/((0[1-9])|([1-31]))\/((\d{2})|(\d{4}))$ |
Description |
Matches U.S. dates with leading zeros and without and with 2 or four digit years |
Matches |
01/01/2001 | 1/1/2001 | 01/1/01 |
Non-Matches |
13/01/2001 | 1/2/100 | 09/32/2001 |
Author |
Rating:
Chris Becker
|
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 |
(\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 |
^(\(?\+?[0-9]*\)?)?[0-9_\- \(\)]*$ |
Description |
A regular expression to match phone numbers, allowing for an international dialing code at the start and hyphenation and spaces that are sometimes entered. |
Matches |
(+44)(0)20-12341234 | 02012341234 | +44 (0) 1234-1234 |
Non-Matches |
(44+)020-12341234 | 12341234(+020) |
Author |
Rating:
James Burton
|
Title |
Test
Details
Pattern Title
|
Expression |
((\d{2})|(\d))\/((\d{2})|(\d))\/((\d{4})|(\d{2})) |
Description |
This matches simple dates against 1 or 2 digits for the month, 1 or 2 digit for the day, and either 2 or 4 digits for the year |
Matches |
4/5/91 | 04/5/1991 | 4/05/89 |
Non-Matches |
4/5/1 |
Author |
Rating:
Andrew Lader
|
Title |
Test
Details
Pattern Title
|
Expression |
^[0-9]{4}\s{0,1}[a-zA-Z]{2}$ |
Description |
Regular expression to evaluate dutch zipcodes. This is an updated version of Roland Mensenkamp. |
Matches |
2034AK | 2034 AK | 2034 ak |
Non-Matches |
2034 AK | 321321 AKSSAA |
Author |
Rating:
Not yet rated.
Jon van Leuven
|
Displaying page
of
pages;
Items to