Value Type |
Example |
Regular Expression |
---|---|---|
Alphanumeric |
ABC 123 |
[A-Z]{3}\s\d{3} |
AF77-12345678 |
[A-Z]{2}\d{2}-\d{8} |
|
Decimal |
3.00 or 12.0 or 8 (3.00) or [12.00] or (8) |
\W?\d{1,2}(?:\W|_)?\d{0,2}\W? |
$156.55 |
\$\d*\.\d{2} |
|
10.001257 |
\d+\.\d+ |
|
Date |
June 06, 2011 |
[A-Z]+\s\d{2}[,.]\s\d{4} |
06 December, 2011 |
\d{2}\s[A-Z.,]+\s\d{4} |
|
Number |
77-123456789 |
77-\d{9} |
0123456789 |
\d{10} (fixed length value) |
|
\d{5,20} (range) |
||
\d+ (variable, minimum length of one character to any maximum length value) |