To add to Arne's answer - if you wanted to also add indexing:
public static int indexOf(String regex, String s, int index)
{
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(s);
return matcher.find(index) ? matcher.start() : -1;
}
call:
int index = indexOf("(?