How do I split a space or comma-separated list?

John Zukowski

The split() method of String takes a regular expression. The pattern "[s,]+" should to the trick. It says the separator will be one or more white space characters or comma.

About | Sitemap | Contact
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.