I've got a mysql based website with a php scripted fromt end. I want to parse the output the php scripts get from the database before "printing it as html" for swear words and substitute these for more acceptable words (on a word for word basis). I need to do it this way as I want to keep the original posts in their "rude" form in case I need evidence for misuse of the site. I need to be able to check for words separated by non alpha characters in case people get clever and write obscenities separated w i t h s p a c e s or with o_t_h_e_r characters or even new l i n e s or wordsruntogetherintoonelongword. I also want a list of permitted words that contain swearwords such as "Scunthorpe" which won't get changed.
Has anybody done this? I have a feeling that there is a 1 line regular expression out there that will do this nicely. Any help appreciated Feeling rusty at coding... CJ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php