note 55421 added to function.preg-grep
| From: | ak85 at yandex dot ru | Date: | Wed, 03 Aug 2005 05:28:47 +0000 |
| Subject: | note 55421 added to function.preg-grep | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-92988@lists.php.net to get a copy of this message | ||
If U wanna find substring without word "BADWORD" U can use this expression:
/((?:(?!BADWORD).)*)/s
For example:
preg_match_all('/<b>((?:(?!</b>).)*)</b>/is',$string,$matches);
// U can find at the $matches substrings of $string between '<b>' and
'</b>' without the same tag '</b>'
// Was found at O'Reilly Rerl Cookbook Russian Edition 2001
----
Manual Page -- http://www.php.net/manual/en/function.preg-grep.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55421
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55421&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55421&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55421&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55421&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55421&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55421&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55421&report=yes
Search -- http://master.php.net/manage/user-notes.php