mercredi 27 juillet 2016

Creating a bad words filter

I have big regex containing bad words. I want to filter those words out, and replace them with first letter and fill rest with astersiks (e.g. s***) Can I do this using regular expressions in C++?
I can use std::sregex_token_iterator, but this will allow me only to replace bad word with fixed amount of asterisks, and without first letter.

Aucun commentaire:

Enregistrer un commentaire