exact code I use it all the time:
#example bad input
$input = "@!#$ damn ass hello";
#how sensoring should look
$rep="!@$#*";
$input=ereg_replace('ass',$rep,$input);
$input=ereg_replace('@!#$',$rep,$input);
$input=ereg_replace('damn',$rep,$input);
when $input is displayed, it would look like this:
!@$# !@$# !@$#* hello
Of course you could change it so that
$rep="";
And then it would look like this when you dipslay it:
hello
I hope that helps.
Perl, Shell, and PHP scripts...
Home of sasquatch, the php search engine.
http://www.pyroxpro.com