My favorites | Sign in
Project Home Downloads Wiki
Project Information
Members
Featured
Downloads
Wiki pages

jquery.regexpCommon.js provides commonly used regular expressions.

someVar.match($.regexpCommon('numberInteger'));
someVar.match($.regexpCommon('numberFloat'));
someVar.match($.regexpCommon('email'));
someVar.match($.regexpCommon('ssn'));
someVar.match($.regexpCommon('url'));
someVar.match($.regexpCommon('phoneNumberUS'));
someVar.match($.regexpCommon('zipCodeUS'));
someVar.match($.regexpCommon('currencyUS'));
someVar.match($.regexpCommon('htmlHexCode'));
someVar.match($.regexpCommon('dottedQuadIP'));
someVar.match($.regexpCommon('macAddress'));
Example:
var quadIP = '127.0.0.1';
if (quadIP.match($.regexpCommon('dottedQuadIP')) ) {
  message += quadIP + " is a Dotted Quad IP Address";
}
Powered by Google Project Hosting