Skip to content

Instantly share code, notes, and snippets.

@jpobst
Created December 3, 2010 21:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpobst/727598 to your computer and use it in GitHub Desktop.
Save jpobst/727598 to your computer and use it in GitHub Desktop.
// Match US Social Security numbers // 123-45-6789 Regex ssn = new Regex (RegexHelper. Digits (3). Character ('-'). Digits (2). Character ('-'). Digits (4) ); // Match email addresses Regex email = new Regex (RegexHelper. AlphaNumeric (
// Match US Social Security numbers
// 123-45-6789
Regex ssn = new Regex (RegexHelper.
Digits (3).
Character ('-').
Digits (2).
Character ('-').
Digits (4)
);
// Match email addresses
Regex email = new Regex (RegexHelper.
AlphaNumeric ().AtLeastOne ().
Character ('@').
AlphaNumeric ().AtLeastOne ().
Character ('.').
InGroup ("com", "net", "org")
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment