I'm working with some really old Java. 1.3 to be exact.
I'm attempting to sanitize some String input by removing non alphabet characters (punctuation and numbers, etc)
Normally I'd do something like:
String.replaceAll("[^A-Za-z]", "");
However, .replaceAll() was introduced in Java 1.4! So it won't compile! http://docs.oracle.com/javase/7/docs/api/java/lang/String.html#replaceAll(java.lang.String, java.lang.String)
How did we accomplish this prior to Java 1.4?
replaceAll()method, were it me, I would iterate over atoCharArray()version of theStringand build a new string, skipping any characters that fall outside of the alphabet range