Hi
Ive just started using preg_match to validate some form info, and ive become very lost and confused. is there a good tutorial on using preg_match that anyone can point me to. Basically my problem is this -
PHP Code:
if(preg_match("/[^a-zA-Z0-9\ \'\@\!\£\$\%\&\*\(]+$/",$string))
above is my preg_match function, the issue with it is that it will only catch an ilegal character if it is the last in the string. clearly this is of no use as a form validator but i have no clue as to why it is happening. all thoughts welcome.
mark
|