This can be used in GWT client code:

http://download.oracle.com/javase/6/docs/api/java/lang/String.html#matches(java.lang.String)

(Of course, you still need to be aware of the differences between Java
and JavaScript regex implementations).

To see if a given Java feature will work in GWT client code, see:

http://code.google.com/webtoolkit/doc/latest/RefJreEmulation.html

On Nov 11, 11:03 am, "anjan bacchu.dev" <anjan.d...@gmail.com> wrote:
> We're using GWT 2.03 along with SmartGWT 2.2. I'm trying to use 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,

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to