Regular expression
| From: | Patrick | Date: | Tue, 14 Feb 2006 21:53:17 +0000 |
| Subject: | Regular expression | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-230389@lists.php.net to get a copy of this message | ||
Hi,
I am trying to validate a password, but havent figured out the pattern for
it yet.
The password must contain atleast 6 characters
a-zA-Z0-9_
must start with a
a-zA-Z
and must have atleast one of the following characters
!#%&$£
correct passwords would be:
a#aAb08
Plkpod!
t09_#8T
U_p#q#Pq
i was trying something like this, but it dosent seem to work:
^[a-zA-Z]{1}[!#%&$]+[a-zA-Z0-9_]+
Patrick