Skip to content

Instantly share code, notes, and snippets.

@ScruffyRules
Last active August 29, 2015 14:01
Show Gist options
  • Save ScruffyRules/2b8e99e9c90bde880473 to your computer and use it in GitHub Desktop.
Save ScruffyRules/2b8e99e9c90bde880473 to your computer and use it in GitHub Desktop.
String[] regex = ("<(.*?)> ," +
"11\\* (.*?) has joined the game\\n," +
"11\\* (.*?) has left the game\\n," +
"\\* 08(.*?) ," +
"There are .? players connected: (.*)\\n," +
"04\\* 08(.*?) has been kicked \\(10\\[You have been kicked] \\n," +
"04\\* 08(.*?) has been kicked \\(Kicked for flying \\(or related\\)\\)\\n," +
"04\\* 08(.*?) has been kicked \\(You logged in from another location\\)\\n").split(",");
Pattern pattern;
Matcher matcher;
for (String patt : regex) {
pattern = Pattern.compile(patt);
matcher = pattern.matcher(output);
while (matcher.find()) {
output = output.replace(matcher.group(), "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment