First, java.util.regex is not emulated in GWT, so there's no reason to
replace Apache Commons with java Regex.
There's however a com.google.gwt.regexp module. You could use something
like:
RegExp r = RegExp.compile("ID:(.*?):ID", "g");
MatchResult m = r.exec(description);
if (m != null) {
foundid = m.getGroup(1);
} else {
// not found
}
(assuming 'description' can contain many things around the ID:...:ID,
otherwise the String.split() option, or even String.substring, possibly
combined with String.startsWith and String.endsWith, is the way to go as
it's less error-prone)
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.