I have suceeded with the help of this community in removing numeric values from user input, however, my code below will only retrieve the alpha characters before the numeric
You can use:
firstname1 = firstname1.replaceAll("[0-9]","");
This will remove all numeric values from String firstName1.
firstName1
String firstname1 = "S1234am"; firstname1 = firstname1.replaceAll("[0-9]",""); System.out.println(firstname1);//Prints Sam