import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class Example {
public static void main(String[] args) {
final String regex = "((?:[01]\\d|2[0-3]):(?:[0-5]\\d):(?:[0-5]\\d)) \\| (Player) \\\"(.+)\\\" (.+) \\(id=(.+) (.+)=<(.+)>(.+)\\\"(.+)\\\" \\(id=(.+)\\<(.+)\\>(.+)with (.+) from (.+) meters";
final String string = "18:43:44 | Player \"Holomo33\" (DEAD) (id=2vL1MZXKHD4qwgO6NSjoThiISfINy5SmNmuhAkbwYHM= pos=<4715.3, 10763.7, 346.8>) killed by Player \"X-CYPHER-3\" (id=aVfM8ohBvcljkZtt5CB77JOY7SNoBAh-sYK0ejvNPJc= pos=<4789.6, 10828.5, 335.4>) with LAR from 99.2274 meters \n";
final Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);
final Matcher matcher = pattern.matcher(string);
while (matcher.find()) {
System.out.println("Full match: " + matcher.group(0));
for (int i = 1; i <= matcher.groupCount(); i++) {
System.out.println("Group " + i + ": " + matcher.group(i));
}
}
}
}
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Java, please visit: https://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html