Regex golf, is this a valid PIN?

Lonnie Olson lists at kittypee.com
Tue Feb 25 11:09:59 MST 2014


On Mon, Feb 24, 2014 at 5:38 PM, S. Dale Morrey <sdalemorrey at gmail.com> wrote:
> Yes Javascript.  In our instance PIN must be at least 9 digits long and
> numeric.  There is no maximum length and we want to encourage longer PIN's.
> Thanks for the help!

a regex for a 9+ digit PIN is a lot simpler than that.

/^[0-9]{9,}$/
or depending on the regex engine you could be more locale friendly
/^\d{9,}$/


More information about the PLUG mailing list