Remove non-letters from a string
From CodeCodex
Revision as of 22:33, 1 September 2007 by 218.58.136.4 (Talk)
Implementations
Java
This code removes common symbols and numbers from a string, returning letters only. (Note, not all symbols are included.)
static String lettersOnly(String s) { return s.replaceAll("[0-9]|[ !@#\\$%\\^