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
  • 37,241
  • 25
  • 195
  • 267
user7531258
  • 37
  • 1
  • 8

0 Answers0