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.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact