note 37865 added to ref.regex
| From: | AccountDemander at gmx dot de | Date: | Sun, 30 Nov 2003 18:10:15 +0000 |
| Subject: | note 37865 added to ref.regex | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-61168@lists.php.net to get a copy of this message | ||
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... .
----
Manual Page -- http://www.php.net/manual/en/ref.regex.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+37865
Delete -- http://master.php.net/manage/user-notes.php?action=delete+37865&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+37865&report=yes
Search -- http://master.php.net/manage/user-notes.php