Exemple
Dream 2,000 bath,5G plus,devid
result
Dream 2,000 bath
5G plus
devid
result
Dream 2,000 bath
5G plus
devid
0
I have a string being passed into a function. The string looks like this: “[teststring]”
There are cases where there may be multiple string in there separated by a delimiter. “[teststring, nogood; dontUse]”
How can I use the java split method to extract the first string, excluding the brackets and the delimiters can be either a comma and/or semi-colon?
This does not work:
Dreamz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.