if(ereg("<",$string))
{ echo "bad string"; }
else
{ echo "good string"; }

If you're trying to do some HTML filtering, there are better ways to do
it.

---John Holmes...

> -----Original Message-----
> From: Ns_Andy [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 14, 2002 5:27 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Regular Expression (for ereg(i))
> 
> if I want eregi to return false if the string contains < char,
> for example,
> "A<B" //false will be returned.
> what's the reg expression I can use?
> 
> --
> Regards,
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to