note 69523 added to function.preg-match

From: Date: Fri, 08 Sep 2006 18:00:33 +0000
Subject: note 69523 added to function.preg-match
Groups: php.notes 
Request: Send a blank email to php-notes+get-116938@lists.php.net to get a copy of this message
Was stumped for a little while trying to match a word, but exclude the same word if part of a specific expression. For example: match "media" but not "windows media" or "quicktime media". What needed to be used in my case is the following: <?php /(?<!windows|quicktime)\smedia/ ?> ? - check < - look left ! - exclude windows|quicktime - the list of words to exclude \s - white space media - word to match ---- Server IP: 195.221.21.36 Probable Submitter: 82.253.124.214 ---- Manual Page -- http://www.php.net/manual/en/function.preg-match.php Edit -- https://master.php.net/note/edit/69523 Del: integrated -- https://master.php.net/note/delete/69523/integrated Del: useless -- https://master.php.net/note/delete/69523/useless Del: bad code -- https://master.php.net/note/delete/69523/bad+code Del: spam -- https://master.php.net/note/delete/69523/spam Del: non-english -- https://master.php.net/note/delete/69523/non-english Del: in docs -- https://master.php.net/note/delete/69523/in+docs Del: other reasons-- https://master.php.net/note/delete/69523 Reject -- https://master.php.net/note/reject/69523 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#116938) next »