All Tags »
regex JavaScript Java
Sorry, but there are no more tags available to filter with.
-
I have this regular expression that evaluate differently in JavaScript versus Java:
var r = new RegExp("^|([0-9][0-9])$", "")
The intent is to accept an string or a 2-digit string. However the call r.test("abc") returns true !
In Java, the equivalent code, Pattern.matches("^|([0-9][0-9])$", ...