📌  相关文章
📜  如何从字符串中删除数字 java - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:47.184000             🧑  作者: Mango

代码示例1
Extract  numbers from a string

Character.isDigit(str.charAt(i))
Character.isLetter(str.charAt(i))
Character.isAlphabetic(str.charAt(i))

String password = "cnE4g1Z5y9A";    
String[] letters= password.split("[0-9]");    ==> cnEgZyA
String[] letters= password.split("[A-Za-z]");    ==> 4159