RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 6
Title Test Details Pattern Title
Expression
^([0-9]{5})([\-]{1}[0-9]{4})?$
Description
Validates against a U.S. postal code in either a 5 digit format or a 5 dash 4 format.
Matches
18017 | 18017-1401
Non-Matches
1801A | 18017- | 18017-152A
Author Rating: Not yet rated. Jeff Johns
Title Test Details Pattern Title
Expression
^([4]{1})([0-9]{12,15})$
Description
Validate against a visa card number. All visa cards start with a 4 and are followed by 12 to 15 more numbers.
Matches
4125632152365 | 418563256985214 | 4125632569856321
Non-Matches
3125652365214 | 41256321256 | 42563985632156322
Author Rating: Not yet rated. Jeff Johns
Title Test Details Pattern Title
Expression
^([51|52|53|54|55]{2})([0-9]{14})$
Description
Validate against any mastercard number. All MC's start with a number between 51 and 55 and are followed by 14 other numbers.
Matches
5125632154125412 | 5225632154125412 | 5525632154125412
Non-Matches
5625632154125412 | 4825632154125412 | 6011632154125412
Author Rating: The rating for this expression. Jeff Johns
Title Test Details Pattern Title
Expression
^([34|37]{2})([0-9]{13})$
Description
Validate against any american express number. All american express numbers start with either a 34 or 37, followed by 13 other numbers.
Matches
341256321524212 | 371524254523125
Non-Matches
425152365212542 | 34256321523621 | 3712563212523651
Author Rating: Not yet rated. Jeff Johns
Title Test Details Pattern Title
Expression
^([6011]{4})([0-9]{12})$
Description
Validate against any discover card number. All DC's start with 6011 and are followed by 12 other numbers.
Matches
6011212541254121 | 6011523654125685
Non-Matches
5021152365212541 | 601126523652321 | 60112563212563215
Author Rating: Not yet rated. Jeff Johns
Title Test Details Pattern Title
Expression
^([30|36|38]{2})([0-9]{12})$
Description
Validate against any diner's club card. All diner club cards start with 30,36, or 38, followed by 12 other numbers.
Matches
30125212365212 | 36125212365212 | 38125212365212
Non-Matches
301252123652121 | 40256631125452 | 361251254125212
Author Rating: Not yet rated. Jeff Johns
   Displaying page 1 of 1 pages; Items 1 to 6

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials