I want to get two decimals from a string using a Regex but I get only the first.
getGroupCount
is correct but I get always {1}
and I don't know why. I'm using GWT 2.5. Here is my code:
private void readOffset(){
RegExp regExp = RegExp.compile("(\\{\\d\\})");
MatchResult matcher = regExp.exec("(cast({1} as float)/{24})");
String val1 = matcher.getGroup(0);
String val2 = matcher.getGroup(1);
}
Why might this be happening?