java - Getting ArrayIndexOutOfBound on String split -


i splitting string in string array.

string = "somestring1, somestring2 00000-0000";     string[] b = a.split("(\\, )|(\\ )|(\\-)");     

and assigning array values

string c = b[0];     string d = b[1];    string e = b[2];    string f = b[3];     

which giving exception arrayindexoutofbound array index out of range: 4


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -