String htmlInput = "
\n| testCommand | \ntestValue | \ntestTarget | \n
";
String htmlRegex = "]*>\\s*()?\\s*]*>\\s*([\\w]*?)\\s*\\s*]*>([\\d\\D]*?)\\s*(]*>([\\d\\D]*?)|)\\s*\\s*";
String xmlInput = "";
String xmlRegex = "";
Pattern pattern = Pattern.compile(xmlRegex);
Matcher matcher = pattern.matcher(xmlInput);
while (matcher.find()) {
System.out.println("found " + matcher.groupCount());
for (int i = 0; i <= matcher.groupCount(); i++) {
System.out.println(i + ": " + matcher.group(i));
}
}