0

I am working with smartgwt since three months. I have encountered a problem with the specific method of the string class.

It seems that the matches never works, even with the simplest one:

String regex = "CEDD";
String input = "CEDD";
input.matches(regex);

this will always returns false. Such piece of code is within a class extending the smartgwt Layout class, and therefore got converted to js and used in front end. The same fragment obviously works when used in a simple java main standalone class.

Could you point out what to investigate to solve this problem ?

thanks

Leonardo
  • 9,607
  • 17
  • 49
  • 89

1 Answers1

0

It looks like GWT doesn't support normal Java regular expressions (i.e. doesn't support Pattern, Matcher and classes/methods that use it.

There is a RegExp class that provides those features, however.

Community
  • 1
  • 1
Joachim Sauer
  • 302,674
  • 57
  • 556
  • 614
  • One other possible solution, altough a bit weird, is to write a native method and write javascript regex in it. – Leonardo May 24 '11 at 13:52