I got this Javascript phone regex:
/^([\+][0-9]{1,3}[ \.\-])?([\(]{1}[0-9]{2,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/
String "063-444-444" passes succesfully.
I tried to convert it to Java:
^([\\+][0-9]{1,3}[ \\.\\-])?([\\(]{1}[0-9]{2,6}[\\)])?(\\[0-9 \\.\\-\\]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$
The same String fails in Java. What's wrong?