Answers for "remove number from string"

3

how to remove integer from string in python

>>> s = '12abcd405'
>>> result = ''.join([i for i in s if not i.isdigit()])
>>> result
'abcd'
Posted by: Guest on February-20-2020
0

how to remove numbers from string java

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
Posted by: Guest on January-14-2021

Code answers related to "remove number from string"

Python Answers by Framework

Browse Popular Code Answers by Language