Shaik Mujahid Ali
Shaik Mujahid Ali

Reputation: 2378

Delete all characters that are not either spaces, zeros or alphabetic characters

i need to Delete all characters that are not either spaces, zeros or alphabetic characters in a string. My regular expression for this is name.replaceAll("[^\\s0A-Z]//", ""). This is not working. Any suggestions?

Upvotes: 1

Views: 51

Answers (1)

vks
vks

Reputation: 67968

name.replaceAll("[^\\s0a-zA-Z]", "") 

this should work for you.

Upvotes: 6

Related Questions