regular expression and exact word search...

From: Date: Thu, 07 Nov 2002 15:40:54 +0000
Subject: regular expression and exact word search...
Groups: php.db 
Request: Send a blank email to php-db+get-23090@lists.php.net to get a copy of this message
Hi! does someone know how to find an exact word in a content with html tags ? I'm using a regexp like this : $searchRegEx = "'\b".$word_search."\b'msi"; to get boundary word results, but... if the searched word is like 'word or word. or anything else, the regular expression doesn't work.. if I remove the \b , I've got all words ( but without bound...) Any idea? (the big problem is I'm higlighting found sentences, and .. if the searched word is part of an html tag, it's very auwfull... )

« previous php.db (#23090) next »