note 37865 deleted from ref.regex by nlopess
| From: | nlopess@php.net | Date: | Wed, 08 Sep 2004 09:58:08 +0000 |
| Subject: | note 37865 deleted from ref.regex by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76215@lists.php.net to get a copy of this message | ||
Note Submitter: AccountDemander at gmx dot de
----
It's always been a great problem to exclude whole strings. It's easy to exclude a single
characters by [^jkhsd], but you cannot exclude whole strings that way... you think!
Here's an easy way to exclude strings:
$s = "string to exclude";
preg_match("/[^" . $s . "]/", $string);
Hope this might help... .