java - Number Regular expression check fails -


i need check expression contains 2 digits slash , 3 digits. have coded following test in java:

string s="11/111"; system.out.println(s.matches("d{2}/d{3}")); 

the method matches returns true if regex matched.however check returns "false". what's wrong regular expression ?

a digit matched \d, not d:

s.matches("\\d{2}/\\d{3}") 

Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -