Last active
August 29, 2015 14:01
-
-
Save ScruffyRules/2b8e99e9c90bde880473 to your computer and use it in GitHub Desktop.
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
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