I need to split words seperated by space/multiple spaces/new line .
String temp[] = stringName.split(delimiter);
How to specify multiple delimiters in one split() method? , or is there a way to specifiy in OR condition?
Printable View
I need to split words seperated by space/multiple spaces/new line .
String temp[] = stringName.split(delimiter);
How to specify multiple delimiters in one split() method? , or is there a way to specifiy in OR condition?
How to make use of regular expressions inside split()?
So,
Whether I should give a regular expression in place of string inside split method?
The String supplied to the split() method is a regex.
Thanks for the reply! Got it..