I need help to understand regex. For some reason, i'v read lots of tutorials and lots of questions here on sof, and cannot manage to understand it. I want to use String.split
function like in here: Java string.split - by multiple character delimiter. But i cant understand this part:
String[] parts = input.split("[,\\s\\-:\\?]");
Lets supose i want to make a split with this following delimiters: " " (space), "." (full stop), "," (coma), "!", "»", "«", etc. How can i get this with regex? I want understand what this characters in here: ("[,\s\-:\?]") are. What does "\s", why is it needed.