note 83858 deleted from function.strip-tags by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 15:51:01 +0000 |
| Subject: | note 83858 deleted from function.strip-tags by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-154704@lists.php.net to get a copy of this message | ||
Note Submitter: Logic
----
Remember sometimes with regex it's easier to list what you want to keep instead of everything
you do not want. Not to mention this makes it easier on the server. With html attributes there may
only be a select few you would want to keep.
Rather than an array that says
$trash = array('a','b','d','f','g');
You could use
$keep = array('c','e');
Simply remember your ^not operator in your final regex.