I'm using spring for setting my regular expression
spring:
<property name="regularExpressionAsString" value="(?<!\\.TMP)\\Z" />
code:
public void setRegularExpressionAsString(String regularEx) {
this.regularExpression = Pattern.compile(regularEx);
}
This doesn't work properly and when I debug my setter I've seen that spring escapes the \ to \\ Is there any way to fix this?