Java remove character from string
// Java remove character from string public class RemoveOnlyLetters { public static void main(String[] args) { String strExample = "jd15352kLJJD55185716kdkLJJJ"; System.out.println("Before: " + strExample); strExample = strExample.replaceAll("[a-zA-Z]", ""); System.out.println("After: " + strExample); } }