I have a stream, which has the following expression:
.map(l -> l.replaceAll("[,.!?:;]", "")
As you can see I want to take a string, and if a string contains one of the values ,.!?:; I want to remove them.
I also want to remove These two symbols: [ ]
When I add it in the sequence:
.map(l -> l.replaceAll("[,.!?[]:;]", "")
The idea gives me an error, unclosed character class. How can I include these two symbols in the sequence as well?