We use GWT 2.03 together with SmartGWT 2.2. I am trying to match a regex as shown below in client 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 seems that the Pattern and Matcher classes are NOT compiled in Javascript by the GWTC compiler, and therefore this application did NOT load. What is the equivalent GWT client code so that I can find regular expression matches within a string?
How could you match regular expressions inside String on the GWT side on the client side?
Thank,
source
share