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)
Thanks,
Yaakov.
On Mon, Feb 15, 2010 at 11:18 AM, Yaakov <[email protected]> wrote:
> Hi all,
>
> So, I stumbled on a bug in GWT that's not been fixed yet:
> http://code.google.com/p/google-web-toolkit/issues/detail?id=3071
>
> Basically, the conversion of Java regex processing to JS regex
> processing seems broken in GWT for now (including the latest 2.0.1).
>
> I was wondering how others approached the issue of parsing the history
> tokens. For example, in my app, I'd like to be able to parse things
> like these:
> view=list
> view=edit&id=2
> etc.
>
> How do you approach this issue?
>
> Thanks,
> Yaakov.
--
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.