Algo.Java.Regex.Tips

// all white spaces

s.replaceAll("\\s+", "");

// only nums

s.matches("[0-9]+");

// except nums

s.matches("[^0-9]+");

// onlyLetters

s.matches("[a-zA-Z]+");

// alphaNumeric

^[a-zA-Z0-9]+$

to continue…

This entry was posted in Без рубрики. Bookmark the permalink.