[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 Shouldn as

[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/,br,$text) or ereg_replace(\n,br,$text) adds the br but doesn't remove the line break While preg_replace(/\n\n/,p,$text) doesn't find any double line breaks, even though they're there Why