I was developed one application using grails 1.3.7 version. where i was using regex expression for password validation.
like..
public static final String MYFAX_PASSWORD_REGEX_PATTERN = "[a-zA-Z0-9!@#\$%^&*()<>{};:.\\]\\[]{4,20}"
and it’s working fine but when i am upgrading this project into grails 2.x then its’ display me below compilation error.
Can anybody help me?
illegal escape character
public static final java.lang.String MYFAX_PASSWORD_REGEX_PATTERN = "[a-zA-Z0-9!@#$%^&*()<>{};:.\]\[]{4,20}";
You can try the Groovy
~"pattern"expression:For more information refer to the Groovy Regular Expressions manual.