Hi all.
I have written my first regex's, which are simply used for validation of
input into a web form. Basically, they check to see if an invalid characters
are being entered, and is working perfectly. A different regex is used to
different types of input.
They are as follows
$Status = (ereg("^[A-Za-z0-9` !@#$%&()=:;\"\'.?/-]*$", $String));
$Status = (ereg("^[0-9 +-]*$", $String)); 0-9 [SPACE] + -
$Status = (ereg("^[A-Za-z`' -]*$", $String)); A-Z a-z ` - ' [SPACE]
$Status = (ereg("^[A-Z_]*$", $String)); A-Z _
$Status = (ereg("^[A-Z ]*$", $String)); A-Z [SPACE]
$Status = (ereg("^[0-9 ]*$", $String)); 0-9 [SPACE]
$Status = (ereg("^[A-Za-z0-9` @#$%&()=:;\"\'.?/-]*$", $String));
At the moment, the error message sent to the browser is along the lines of
"You have entered invalid characters. Please check and try again." However,
I would rather be able to tell them WHICH characters they entered represent
a problem.
How can I get a the list of characters tht causes one of these regex's to
fail?
======================================================================
Murray Shields Email: [EMAIL PROTECTED]
MU Systems Pty Ltd Phone: +61 7 3351 6677
Global Catalogs Pty Ltd Phone: +61 7 3351 4777
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]