Re: detecting HTML tags
| From: | James Holloway | Date: | Tue, 15 May 2001 16:25:46 +0000 |
| Subject: | Re: detecting HTML tags | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52886@lists.php.net to get a copy of this message | ||
Hi Bill
<?
if (preg_match("/([\<])([^\>]{1,})*([\>])/i", $string)) {
echo "Houston, we have a problem.";
}
?>
James.
"bill" <bill@billtron.com> wrote in message
news:3B013FB9.D4E54306@billtron.com...
> Is there a way to detect the presence of HTML tags?
>
> I don't want them stripped out, I just want to know if a string contains
> them.
>
> I'm rolling my own mailing program and want it to detect the HTML if
> present and send it appropriately.
>
> kind regards,
>
> bill hollett
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>