java.util.regex.Pattern p = Pattern.compile("/\"(.*?)(?:<[^>]+>)<([^>]*)><([^>]*)>\"/g");
String value = "log L 02/15/2008 - 18:50:28: \"NaNg<23><1133><STEAM_0:0:11232133><TERRORIST><1133><STEAM_0:0:4132413><TERRORIST>\" disconnected";
Matcher m = p.matcher(value);
System.out.println(m.groupCount());
for (int i = 0; i <= 4; i++) {
try {
System.out.println(m.group(i));
}
catch (Exception exp) {
System.out.println(exp.toString());
}
}
output:
3
java.lang.IllegalStateException: No match found
java.lang.IllegalStateException: No match found
java.lang.IllegalStateException: No match found
java.lang.IllegalStateException: No match found
java.lang.IllegalStateException: No match found