Thanks for pointing that out. I somehow missed that part of the GWT docs. Regards, Yaakov.
On Mon, Feb 15, 2010 at 8:11 PM, Thomas Broyer <[email protected]> wrote: > > > On 15 fév, 18:22, Yaakov Chaikin <[email protected]> wrote: >> Hmm... >> >> I think I spoke too soon. Well, maybe not, but what I was experiencing >> is probably NOT related to the bug I mentioned... >> >> Here is the regex that was working 100% in development (2.0.1) and not >> at all in production: >> private static final String HISTORY_TOKEN_REGEX = >> "\\p{Alpha}+[\\p{Alnum}]*=[\\p{Alnum}.\\-*_+%()]*(&\\p{Alpha}+\\p{Alnum}*=[ >> \\p{Alnum}.\\-*_+%()]*)*"; >> >> After changing all the \p{xxx} stuff to their concrete character >> equivalent, everything seems to work in both development and >> production: >> private static final String HISTORY_TOKEN_REGEX = >> "[a-zA-Z]+[a-zA-Z0-9]*=[a-zA-Z0-9.\\-*_+%()]*(&[a-zA-Z]+[a-zA-Z0-9]*=[a-zA- >> Z0-9.\\-*_+%()]*)*"; >> >> Is it documented somewhere that GWT does not allow you to use POSIX >> character classes documented in the Pattern class? >> (http://java.sun.com/javase/6/docs/api/java/util/regex/Pattern.html) > > http://code.google.com/webtoolkit/doc/latest/DevGuideCodingBasicsCompatibility.html > """"The syntax of Java regular expressions is similar, but not > identical, to JavaScript regular expressions. For example, the > replaceAll and split methods use regular expressions. So, you will > probably want to be careful to only use Java regular expressions that > have the same meaning in JavaScript.""" > > See http://www.ecma-international.org/publications/standards/Ecma-262.htm > for the spec, which does not include POSIX character classes (only \d > \D \s\S \w and \W are supported "character class escapes", which are > locale-independent, i.e. \d is strictly equivalent as [0-9], and \w is > [a-zA-z0-9_], and \s includes all Unicode 3.0 "space separator" > characters) > > -- > 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. > > -- 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.
