I have a scenario where a user input can be an arabic date like ٢٠١٩-٠٣-٣٠ or normal date like 2019-07-31.
I am trying to find a regular expression which matches both cases
right now I am using the regex to match the arabic date with the one I got from here
my code is like
String s1 = "٢٠١٩-٠٣-٣٠";
String regx = "^[\\u0621-\\u064A\\u0660-\\u0669 ]+$";
System.out.println(regx.matches(s1));
but its printing false, how can I fix it, also how can I add the normal date regex to this one ?