开发者

use of String.matches(regex) in smartgwt

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);
开发者_Go百科

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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜