Read the docs. Look at the assertion part. ?= and the opposite of it. Best regards, Andrey Hristov
On Friday 08 March 2002 05:51 pm, you wrote: > Hello! > > I use > > $txt = preg_replace("#((<?php .*?</A>)|$search)#se", '"\2"=="\1"? > "\1":"$replace"', $txt); > > to replace some text in $txt. The problem: Parts of words are replaced, > too. How can I make preg_replace replace only words, which means, that > the word is followed by space . , -, but not by other letters/numbers? > > Martin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php