I want a java regex expression that accepts only the numbers and dots.
for example,
1.1.1 ----valid 1.1 ----valid
"^\\d(\\.\\d)*$" 1 ----valid (if it must be not valid, replace `*` => `+` ) 1.1.1 ----valid 1.1 ----valid 1.1.1.1---valid 1. ----not valid 11.1.1 ---not valid (if it must be valid, add `+` after each `d`)