This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static final Pattern multipleChars = Pattern.compile("([a-zA-Z]+)(\1{2,})"); | |
public static String cleanSpam(String spam){ | |
Matcher matcher = multipleChars.matcher(spam); | |
if(!matcher.find()) | |
return spam; | |
Set<String> chars = new HashSet<>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\u0070\u0075\u0062\u006C\u0069\u0063\u0020\u0063\u006C\u0061\u0073\u0073\u0020\u0046\u006F\u006F\u0020\u007B\u000A\u0009\u000A\u0009\u0070\u0075\u0062\u006C\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0076\u006F\u0069\u0064\u0020\u006D\u0061\u0069\u006E\u0028\u0053\u0074\u0072\u0069\u006E\u0067\u002E\u002E\u002E\u0020\u0061\u0072\u0067\u0073\u0029\u007B\u000A\u0009\u0009\u000A\u0009\u0009\u0053\u0079\u0073\u0074\u0065\u006D\u002E\u006F\u0075\u0074\u002E\u0070\u0072\u0069\u006E\u0074\u0028\u0022\u0048\u0065\u006C\u006C\u006F\u0020\u0057\u006F\u0072\u006C\u0064\u0022\u0029\u003B\u000A\u0009\u0009\u000A\u0009\u007D\u000A\u0009\u000A\u007D |
NewerOlder