How to remove special characters from an ArrayList?
I have an ArrayList like this: [['something:','outside,,']]
and I want to remove all the special characters.
How can I do that ?
Create a regex which matches with your criterias. And then loop through your list.
String myRegex = "[^a-zA-Z0-9]"; int index = 0; for (String s : list) list.set(index++, s.replaceAll(myRegex, ""));