This will remove all digits:
firstname1 = firstname1.replaceAll("\\d","");
More Related Contents:
- Replace a character specific number of times in String Java
- Java; Initializing A Count of Input, After Period Is Entered
- How to parse a mathematical expression given as a string and return a number? [duplicate]
- Regex to match a C-style multiline comment
- Difference between String replace() and replaceAll()
- Splitting a string at every n-th character
- Convert float to String and String to float in Java
- How to split a string in Java
- Why is the String class declared final in Java?
- Java – Best way to grab ALL Strings between two Strings? (regex?)
- Fast algorithm for searching for substrings in a string
- Java change áéőűú to aeouu [duplicate]
- Extracting pairs of words using String.split()
- XML Document to String
- Extract Integer Part in String
- String replace a Backslash
- Converting ArrayList of Characters to a String?
- Java String literals concatenation
- Can a valid Unicode string contain FFFF? Is Java/CharacterIterator broken?
- Display special characters using System.out.println
- When to use intern() on String literals
- In Java, how to find if first character in a string is upper case without regex
- How to convert String object to Boolean Object?
- Sort a single String in Java
- Java string intern and literal
- Java split String performances
- Find all words with 3 letters with regex
- Using DocumentFilter.FilterBypass
- split string only on first instance – java
- How to use String.format() in Java? [duplicate]