Hi there, I'm doing regular expressions on text with an apostrophe/single quote in it, and it's giving me errors: I'm already preg_quote()ing to cancel out the brackets that appear in the text, but I can't seem to get rid of the '. Any ideas? btw, this is my expression: $postbody = preg_replace(preg_quote("'$term2' i", '/'), "$part1<span class=\"highlight1\">$part2</span></a>", $postbody); thanks very much - dunstan --------------------------- Dorset, England http://www.1976design.com/ http://www.orchard.it/ http://www.maccaws.org/