+ Reply to Thread
Results 1 to 2 of 2

Thread: Force user to enter password that contains symbols inside it

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    27

    Force user to enter password that contains symbols inside it

    I want user to enter password with at least 15 characters which must consists of Capital and Small letters, numbers and symbols. But I only know how to create pattern with Capital and Small letters and numbers
    Here is my Password Pattern i am using :
    Code:
    "^(?=.*[0-9])(?=.*[A-Z])(?=.*[a-z])[0-9A-Za-z]{15,}$"
    I`d appreciate if you told me the correct Password Pattern

  2. #2
    Junior Member
    Join Date
    Jan 2012
    Posts
    35
    You could add the section (?=.*[^\W_]) to check for anything except alphanumeric (A-Z, a-z, 0-9) symbols. Or, you could specify a set of symbol
    characters like (?=.*[\.\*]). If you do, replace the contents of the [] with all the characters you want to allow, using a backslash before
    each character that has a regex function. (The example shows a section that allows two characters, . and *.)

+ Reply to Thread

Tags for this Thread

Bookmarks

Posting Permissions

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