Results 1 to 2 of 2

Thread: String Expression for apha numeric password

  1. #1

    Thread Starter
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    String Expression for apha numeric password

    I need a string expression to verify an alpha numeric password. This is what
    i've come up with , however it does not work:

    PHP Code:
    elseif ( (!ereg ("^[a-zA-Z]+$"$password)) || (!ereg ("^[0-9]+$",
    $password))) 
    can anybody help? Thanks in advance
    ADAM

  2. #2
    Frenzied Member
    Join Date
    Nov 1999
    Posts
    1,337
    try this

    elseif ( (!ereg ("^[:ALPHA:]+$", $password)))

    or

    elseif ( (!ereg ("^[a-zA-Z0-9]+$", $password)))

Posting Permissions

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



Click Here to Expand Forum to Full Width