Results 1 to 3 of 3

Thread: sledge

  1. #1
    Join Date
    Dec 1969

    Default sledge

    I am a newbie to regular expressions and was hoping someone could help me out with my password validation expression. The rules of the password are that it must be at least 8 characters long and consisting of at least 2 letters and 2 numbers.<BR><BR>This is my expression so far:<BR>^(?=w*d)(?=.*[a-zA-Z]).{8,}$<BR><BR>Any help would be greatly appreciated.<BR><BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default my 2 cent regexp

    this will match your pattern<BR>((d.*[a-z])&#124([a-z].*d)){2,}<BR><BR>english translation:<BR>((digit, 0 or more of any char, letter)<BR>-OR-<BR>(letter, 0 or more of any char, digit))<BR>OCCURS 2 times or more<BR><BR>i couldn&#039;t figure out how to add in the length requirement too, so you can just use len or match .{8,} <BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: sledge

    Untested, but try this:<BR><BR>(?=.*d.*d)(?=.*w.*w)[dw]{8,}

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts