I use something similar to transform certain words into links and to "block" certain subrepticious spams.
I use the hook "postbit_display_complete", so its executed on every "page-spam" using "newreply_process" and "newthread_process" would be more efficient but less versatile.
Here is an option ^^ up to you tu take it. Regular expressions power

.
Code:
$custom_replace[] = array (
'string' => '/plainword/',
'replacement' => '<a>tunned plain word</a>',
'act' => 1,
'grp' => 1
);
....
$custom_replace[] = array (
'string' => '/plainword10000/',
'replacement' => '<a>tunned plain word 10000</a>',
'act' => 1,
'grp' => 10000
);
$counter=0;
$grp_old=0;
foreach ($custom_replace as $k => $v) {
if ( $v['act'] == 1) {
if($v['grp']<>$grp_old){
$grp_old=$v['grp'];
$counter=0;
}
if($counter==0){
$counter=preg_match ( $v['string'] , $this->post['message']);
if($counter<>0){
$this->post['message'] = preg_replace($v['string'],$v['replacement'],$this->post['message'],-1);
}
}
}
}