0
String[] textA = a.split("\\s"); //splits the string when it meets a white space character

I want to make it so when it meets either a , or a . it would still split. Is there any way I can achieve this with multiple conditions without doing an if statement?

For example a.split("\\s || ,"); something like this.

Cœur
  • 34,719
  • 24
  • 185
  • 251

0 Answers0