String foo = "this is a thing with & in it";
foo = foo.replaceAll("[^A-Za-z0-9()\[\]]", "");
Javadocs are your friend. Regular expressions are also your friend.
Edit:
That being siad, this is only for the Latin alphabet; you can adjust accordingly. \w
can be used for a-zA-Z
to denote a "word" character if that works for your case though it includes _
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…