match with java 8 regex string form any language

Viewed 840

I try to match with java 8 regex string form any language

as long as it includes letters, digits and . or -

String s = "בלה בלה";
String pattern= "^[\\p{L}\\p{Digit}_.-]*$";
return s.matches(pattern);

what am i missing as this code returns null for hebrew valid string.

1 Answers
Related