RE: [PHP] Regular Expression (for ereg(i))
| From: | John W. Holmes | Date: | Mon, 14 Oct 2002 15:30:09 +0000 |
| Subject: | RE: [PHP] Regular Expression (for ereg(i)) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-119915@lists.php.net to get a copy of this message | ||
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:ns_andy@yahoo.com]
> Sent: Monday, October 14, 2002 5:27 AM
> To: php-general@lists.php.net
> 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