Site:Developer stuff/Fix rss titles
From Feast upon the Word (http://feastupontheword.org). Copyright, Feast upon the Word.
The following seems to be working for now, but obviously it will mess up either if there is the word by in the user name or in the title. I haven't tested which one is going to cause the problem but my guess it is the user name--i.e. that the regular matching expression will prefer the last "by".
if (preg_match("/^Comment on(.*)by(.*)/", $title, $matches)) {
$title = $matches[2]." on ".$matches[1];
}