151
rated 0 times
[
152]
[
1]
/ answers: 1 / hits: 16064
/ 14 Years ago, thu, november 11, 2010, 12:00:00
We're using GWT 2.03 along with SmartGWT 2.2. I'm trying to match a regex like below in client side code.
Pattern pattern = Pattern.compile(\(/d+){4}\);
String testString1 = [ /2/4/5/6/8, /2/4/5/6];
String testString2 = [ ];
Matcher matcher = pattern.matcher(testString1);
boolean result = false;
while (matcher.find()) {
System.out.println(matcher.group());
}
It appears that Pattern and Matcher classes are NOT compiled to Javascript by the GWTC compiler and hence this application did NOT load. What is the equivalent GWT client code so that I can find regex matches within a String ?
How have you been able to match regexes within a String in client-side GWT ?
Thank you,
More From » java