1 Replies - 1548 Views - Last Post: 22 June 2016 - 10:07 AM

#1 DuoShin85  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 39
  • View blog
  • Posts: 135
  • Joined: 18-December 09

Validate Password

Posted 10 February 2010 - 09:00 AM

Description: Matches a password with at least 8 alphanumeric characters followed by 2 numeric characters.
^[a-zA-Zd]{8,}[d]{2}$

Is This A Good Question/Topic? 0
  • +

Replies To: Validate Password

#2 dday9  Icon User is offline

  • D.I.C Regular

Reputation: 94
  • View blog
  • Posts: 495
  • Joined: 17-April 13

Re: Validate Password

Posted 22 June 2016 - 10:07 AM

You've forgotten the backslash for the digit character class, for example:
^[a-zA-Zd]{8,}[d]{2}$

Should be:
^[a-zA-Z\d]{8,}\d{2}$

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1