Hello Murray,
(MS == "Murray Shields") [EMAIL PROTECTED] writes:
MS> I have written my first regex's, which are simply used for
MS> validation of input into a web form. Basically, they check to see
MS> if an invalid characters are being entered, and is working
MS> perfectly. A different regex is used to different types of input.
MS> They are as follows
<snipped examples>
MS> At the moment, the error message sent to the browser is along the
MS> lines of "You have entered invalid characters. Please check and
MS> try again." However, I would rather be able to tell them WHICH
MS> characters they entered represent a problem.
You can use parentheses around items you wish to match-and-store and
refer to those items later.
There is a 3rd argument to ereg(), and that can hold your matches.
ereg (string pattern, string string [, array regs])
Look at the example on this page:
http://www.php.net/manual/html/function.ereg.html
And for a different flavor:
http://www.php.net/manual/html/function.ereg-replace.html
MS> How can I get a the list of characters tht causes one of these
MS> regex's to fail?
-Brian
--
While money can't buy happiness, it certainly
lets you choose your own form of misery.
--
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]