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 3
Title Test Details Phone matcher for NANP telephone number
Expression
(?:\([2-9][0-8]\d\)\ ?|[2-9][0-8]\d[\-\ \.\/]?)[2-9]\d{2}[- \.\/]?\d{4}\b
Description
Matches NANP requirements for valid telephone numbers in the USA, its territories, Canada, Bermuda, and 16 Caribbean nations.<br> Area code: [2-9][0-8][0-9]<br> Exchange code: [2-9][0-9][0-9]<br> Station code: [0-9][0-9][0-9][0-9]<br> Accepts common phone number separators like parentheses, dash/hyphen, slash, period, and space. Stops matching at any word boundary, including end of line. Adapted from Don Johnston's pattern.
Matches
8296399623 | 741 556-4630 | 319.380.3232 | (859)673.5793 | 660/471.5749
Non-Matches
(195)979-5873 | 763 027 5552 | 596 270.0326 | 8915551212
Author Rating: Not yet rated. Gregory Krohne
Title Test Details Ingress passcode
Expression
\b([2-9][p-z][a-h][2-9]{1,2}[a-z]+[p-z][2-9][p-z][2-9][p-z]|[a-z][a-z]+\d{2}[a-z]|[2-9][p-z]{2}[a-h][2-9]{1,2}[a-z]+[p-z][2-9]{3}[p-z]|\d{12}|[2-9][p-z][a-h][2-9][a-z0-9]+[p-z][2-9]{3}[p-z])\b
Description
Matches most common Ingress passcode patterns.
Matches
2wg8ingress5r9q|826661003000|8yd8resonateq892q
Non-Matches
everywhere|w28gingressr5q9|9266610030
Author Rating: Not yet rated. Gregory Krohne
Title Test Details Even Numbers
Expression
(-?[1-9]*\d*[02468])(?=\D)
Description
Match even integers, positive or negative, including zero.
Matches
-100,-10,-2,0,2,4,6,8,10,12,100,102
Non-Matches
-101,-99,-11,-1,1,3,5,7,9,11,99,101
Author Rating: Not yet rated. Gregory Krohne
   Displaying page 1 of 1 pages; Items 1 to 3

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