String line = "myFamily[10].child[2]";
Pattern p = Pattern.compile("\\[(\\d+)\\][^\\[]*\\[(\\d+)\\]");
Matcher m = p.matcher(line);
if (m.find())
{
int row = Integer.parseInt(m.group(1));
int col = Integer.parseInt(m.group(2));
System.out.println(row + "\t" + col);
}