[PHP] words for pspell

2002-03-02 Thread Tom Kincaid
I'm trying to use pspell for a forum. It works great, but I can't quite figure out how to pull individual words out of a string for it. preg_match ("/\b.+?\b/", $text, $matches) works almost perfectly, EXCEPT apostrophes are word boundaries so the string "Shouldn't this work?" would have "Shou

[PHP] problems with replacing line breaks

2002-03-01 Thread Tom Kincaid
I'm trying to replace line breaks with html code and am having problems. For single lines preg_replace("/\n/","",$text) or ereg_replace("\n","",$text) adds the but doesn't remove the line break. While preg_replace("/\n\n/","",$text) doesn't find any double line breaks, even though they're ther