You could also loop through the
String char by
char (this might not work for Chinese Japanese or Korean text), checking each
char with the appropriate methods of the
Character class. If the particular
char fulfils your requirements, append it to a StringBuilder. Beware: if you create
new StringBuilder('a'), you
do not get a StringBuilder with the letter
a in.