c# - Check a users comment for multiple extra letters added on to a banned word -


i want filter bad words 'asshole' can bypass word saying 'asssssshole' or 'asshoooole'

here code currently.

string word = "asshole";  if (comment.contains(word)     //block comment being posted 

how check message multiple letters added on banned word, without creating hundreds of different rules each way can spell 'asshole'.

you might have partial success using soundex. try putting variations https://www.functions-online.com/soundex.html , return same value a240, a*s*h*o*l*e. unfortunately won't work a$$hole, might able come simple substitutions run before testing.

it should pretty easy find c# implementation online.


Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -