Displaying page
of
pages;
Items to
| Title |
Test
Details
Numeric including commas, decimal, negative, and currency
|
| Expression |
^((\$?\-?)|(\-?\$?))([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)?(\.[0-9]*)?$ |
| Description |
Matches any number which includes the US currency symbol ($), a negative sign (-), comma separators, and a decimal. It matches an unlimited number of decimal places. It does NOT reject an empty string passed to it. Credit goes to Al Kahler for posting the original expression from http://regxlib.com/REDetails.aspx?regexp_id=70 along with a fix for the decimal place. |
| Matches |
$.01 | 1,234.003 | 834223.1 | $0.01 | -$1.50 | $-50.123 |
| Non-Matches |
.0,001 | 1,1.01 | 1E | 5$ |
| Author |
Rating:
Ed Hammar
|
| Title |
Test
Details
Allows letters numbers hyphens periods and underscore
|
| Expression |
^((\.)?([a-zA-Z0-9_-]?)(\.)?([a-zA-Z0-9_-]?)(\.)?)+$ |
| Description |
Allows letters,numbers,hyphens,periods and underscores. Such as : Aa.Aa.Aa, .Aa.Aa. , -Aa-Aa- , _Aa_Aa_ , Aa_Aa_Aa , Aa-Aa-Aa , . , - , _
I was asked by my client for this scenario to allow letters,numbers,hyphens,periods and underscores in User ID field in web application. |
| Matches |
_-.aAa._-.aAa_-. |
| Non-Matches |
special charachters |
| Author |
Rating:
adnan
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(^([0-9]|[0-1][0-9]|[2][0-3]):([0-5][0-9])(\s{0,1})([AM|PM|am|pm]{2,2})$)|(^([0-9]|[1][0-9]|[2][0-3])(\s{0,1})([AM|PM|am|pm]{2,2})$) |
| Description |
|
| Matches |
12:30PM |
| Non-Matches |
1300 |
| Author |
Rating:
Not yet rated.
Osaro bare
|
| Title |
Test
Details
Currency with Currency Code Prefix
|
| Expression |
^([A-Z]{0,3})?[ ]?([0-9]{1,3},([0-9]{3},)*[0-9]{3}|[0-9]+)(.[0-9][0-9])?$ |
| Description |
Matching currency entry with upto 3 letter currency code as prefix |
| Matches |
USD2000.20, USD 2000, INR 150.150, QR 150, 15000 |
| Non-Matches |
usd2000.20, usd 2000, inr 2000, $250 |
| Author |
Rating:
Not yet rated.
Ullaskumar V
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(\s|\n|^)(\w+://[^\s\n]+) |
| Description |
will match free floating valid protocol + urls in text ... will not touch the ones wrapped in a tag, so that you can auto-link the ones that aren't :) couple of things to know :
1. if the url is next to a tag this won't work (eg : <br>http://www.acme.com), the url must either start with a \s, \n or any character other than >.
2. the pattern will match the preceding \s and \n too, so when you replace put them back in place $1 will either be \s or \n, $2 will be the exact match
vb usage :
set re = New RegExp
re.Pattern ="(\s|\n|^)(\w+://[^\s\n]+)"
strResult = re.Replace(strText, "$1<a href='$2' target='_new'>$2</a>") |
| Matches |
http://www.acme.com | ftp://ftp.acme.com/hede | gopher://asdfasd.asdfasdf |
| Non-Matches |
<a href="http://acme.com">http://www.acme.com</a> | <br>http://www.acme. |
| Author |
Rating:
ic onur
|
| Title |
Test
Details
.Net type name with full assembly name
|
| Expression |
^(?<type>(\w+(\.?\w+)+))\s*,\s*(?<assembly>[\w\.]+)(,\s?Version=(?<version>\d+\.\d+\.\d+\.\d+))?(,\s?Culture=(?<culture>\w+))?(,\s?PublicKeyToken=(?<token>\w+))?$ |
| Description |
.Net full type name with full assembly name |
| Matches |
aaa.bbb.ccc, Aaa, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
| Non-Matches |
Aaa, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null |
| Author |
Rating:
Not yet rated.
Sercan AYYILDIZ
|
| Title |
Test
Details
Yet another URI checker
|
| Expression |
^([a-zA-Z]+)://([a-zA-Z0-9_\-]+)((\.[a-zA-Z0-9_\-]+|[0-9]{1,3})+)\.([a-zA-Z]{2,6}|[0-9]{1,3})((:[0-9]+)?)((/[a-zA-Z0-9_\-,.;=%]*)*)((\?[a-zA-Z0-9_\-,.;=&%]*)?)$ |
| Description |
Checks whether the entered string looks like a URI, with a specified protocol. Optionally, you can add the port number, and some GET variables.
The control is quite loose, but it's a choice of mine.
Comments and corrections are welcome. |
| Matches |
this://is.accepted.com/?and=it&sO=K | this://is.accept.ed?too= | and://also.this.one:12/?is=right |
| Non-Matches |
this.is.NOT.accepted | neither://this.is&one | abs://olut.ely.no:way |
| Author |
Rating:
Not yet rated.
Claudio Di Ciccio
|
| Title |
Test
Details
US Dallor
|
| Expression |
^\$((\d{1})\,\d{1,3}(\,\d{3}))|(\d{1,3}(\,\d{3}))|(\d{1,3})?$ |
| Description |
accepts US dallor upto 9,999,999 |
| Matches |
9|56,567|222,556 |
| Non-Matches |
999,76|2.23|9,999,999.8945 |
| Author |
Rating:
Not yet rated.
Tayyaba Nosheen
|
| Title |
Test
Details
Percentage
|
| Expression |
^(100(?:\.0{1,2})?|0*?\.\d{1,2}|\d{1,2}(?:\.\d{1,2})?)$ |
| Description |
generate percentage with 2 values after point |
| Matches |
3.00|100.00|45 |
| Non-Matches |
101|4.678|425.876 |
| Author |
Rating:
Not yet rated.
Tayyaba Nosheen
|
| Title |
Test
Details
Web Address
|
| Expression |
^((http|https|ftp)\://)?([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((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])|([a-zA-
Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.[a-zA-Z]{2,4})(\:[0-9]+)*(/[^/][a-zA-Z0-9\.\,\?\'\\/\+&
%\$#\=~_\-]*)*$ |
| Description |
accepts just the web address |
| Matches |
http://bla/bla.com |
| Non-Matches |
bla@bla|bla|@bla.com |
| Author |
Rating:
Tayyaba Nosheen
|
| Title |
Test
Details
Web Address
|
| Expression |
^((http|https|ftp)\://)?([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((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])|([a-zA-
Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.[a-zA-Z]{2,4})(\:[0-9]+)*(/[^/][a-zA-Z0-9\.\,\?\'\\/\+&
%\$#\=~_\-]*)*$ |
| Description |
accepts just the web address |
| Matches |
http://bla/bla.com |
| Non-Matches |
bla@bla|bla|@bla.com |
| Author |
Rating:
Tayyaba Nosheen
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(\..+)?$)[^\x00-\x1f\\?*:\";|/]+$ |
| Description |
Checks for a valid windows file name (Must be used with the case-insensitive option
Checks that the file has at lease one char, does not contain any invalid characters and does not have a reserved word as a file name.
"If you see a &quot; in the regex replace it with a " character" |
| Matches |
test.txt | test.jpg.txt | a&b c.bmp |
| Non-Matches |
CON | .pdf | test:2.pdf |
| Author |
Rating:
Not yet rated.
Andre Van Der Merwe
|
| Title |
Test
Details
Retreive text between parenthesis
|
| Expression |
[\(]{1,}((?:(?<t>[^\(]*))[)]{1,}) |
| Description |
This regex will retreive any text between parenthesis characters (including the parenthesis themselfs) |
| Matches |
Test (test 1) | (test) |
| Non-Matches |
Test |
| Author |
Rating:
Joakim Höglund
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^\d{4}[\-\/\s]?((((0[13578])|(1[02]))[\-\/\s]?(([0-2][0-9])|(3[01])))|(((0[469])|(11))[\-\/\s]?(([0-2][0-9])|(30)))|(02[\-\/\s]?[0-2][0-9]))$ |
| Description |
- validates a yyyy-mm-dd, yyyy mm dd, or yyyy/mm/dd date
- makes sure day is within valid range for the month
- does NOT validate Feb. 29 on a leap year, only that Feb. CAN have 29 days |
| Matches |
0001-12-31 | 9999 09 30 | 2002/03/03 |
| Non-Matches |
0001\02\30 | 9999.15.01 | 2002/3/3 |
| Author |
Rating:
Rex Po
|
| Title |
Test
Details
FR (French) VAT Number
|
| Expression |
^(FR)?\s?[A-Z0-9-[IO]]{2}[0-9]{9}$ |
| Description |
0 or one FR +
0 or one space +
11 characters (that may include alphabetical characters - any except O or I (first or second or first and second))
12345678901 -
X1234567890 -
1X123456789 -
XX123456789 -
. |
| Matches |
FR 1R123456789 | FR R1123456789 | FRR1123456789 | K1232345674 |
| Non-Matches |
FR I123456789 | FR O123456789 | FR 1O23456789 |
| Author |
Rating:
Not yet rated.
Ayhan Yerli
|
| Title |
Test
Details
Indian Postal/Zip code
|
| Expression |
^(?!0{1})\d{6} |
| Description |
Indian Postal has siz digit of length and does not start with zero |
| Matches |
362265 , 1254215, 256201 |
| Non-Matches |
021545 |
| Author |
Rating:
Not yet rated.
Rakes Singh
|
| Title |
Test
Details
Pattern Title
|
| Expression |
^(\(\d{3}\)[- ]?|\d{3}[- ])?\d{3}[- ]\d{4}$ |
| Description |
US telephone pattern. Optional area code with or without '()'. If area code has parentheses then it is optionally followed by - or space. If no parentheses then it must be followed by - or space. Number must be separated by either a space or -. |
| Matches |
(555)555-5555 | (555) 555-5555 | 555-5555 |
| Non-Matches |
5555555555 | 555.555.5555 | (555 555-5555 |
| Author |
Rating:
Charles Eatley
|
| Title |
Test
Details
Pattern Title
|
| Expression |
(^\d*\.?\d*[0-9]+\d*$)|(^[0-9]+\d*\.\d*$) |
| Description |
This matches all positive decimal values. There was one here already which claimed to but would fail on value 0.00 which is positive AFAIK... |
| Matches |
0.00 | 1.23 | 4.56 |
| Non-Matches |
-1.03 | -0.01 | -0.00 |
| Author |
Rating:
Derek Noonan
|
Displaying page
of
pages;
Items to