Thanks for this answer.
But how can i test if i actually have numbers AND letters ?
<pricee@hhbrow To: [EMAIL PROTECTED]
n.com> cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Ereg ()
On Tuesday, April 16, 2002, at 08:49 AM, [EMAIL PROTECTED] wrote:
> I'm new with RegEx and I would like to use them to validate my forms
> entries submitted to the server.
> My question is how can I verify with the regex that a string is
> - at least 7 chars
> - contains Chars and Nums
> - may contains some special chars (ex : % ! : ; , )but not in first or
> position .
I'm assuming that by Chars you mean uppercase/lowercase letters?
Numbers are characters too, I thought.
The above regex will only match a string that begins with A-Z or a-z or
0-9, then any number of characters that are in the middle character
class, then a final A-Z or a-z or 0-9.
I think. Try it out, that's untested.
Web Developer Temp
Media Lab, H.H. Brown
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php