Search code examples
javastringgwtgxt

String back referencing is not working in GXT server mode but works in GXT dev mode


I have the below code which works perfectly in GXT development mode. But it is not working in GXT server mode. Can you please help me in resolving this?

String stringValue = "Servicing";
if (stringValue != null && !stringValue.isEmpty()) {
    String newData = stringValue.replaceAll("(?i)servi", "<mark>$0</mark>");
    System.out.println(newData);
}

Solution

  • You have to use GXT's RegExp and Matcher to make it work in Server mode.