I have a long String coming from a different system that I am escaping using regexp using:
i.e. reserve only alphanumeric and white spaces.
The problem is that I still get the \n in the splitted array and I would like to remove it.
I can do a replaceAll("\\n", "") on each String in the array however would really prefer to do it in the original pattern before the split.