regular expressions

From: Date: Sun, 04 Jun 2000 07:09:59 +0000
Subject: regular expressions
Groups: php.general 
Request: Send a blank email to php-general+get-966@lists.php.net to get a copy of this message
Hi there, I want to detect certain words in a sentence, but I want to avoid the same words if they appear inside a tag (meaning I want to detect only those in the text the user sees). I tried this pattern but none worked well. For example: <div align='left'>this is the word test link to <a href='http://www.test.com'>test</a> </div>"; How do I manage to detect *only* the first and the third instants of the word TEST in the above example? Thanks, David.

« previous php.general (#966) next »