Censored Words Condition

The best solution would be to use a regex with word boundary.

if(myString.matches(".*?\\bdarn\\b.*?"))

This prevents you from matching sdarnsas a rude word. 🙂 demo here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)