java - Split word by regex -
i have line like: id,name,field,field
.
example: "100,artist10xd,0,1"
.
i want separate them using regex. problem artistname
can have comma (the actual number of commas here unknown), cannot use split(",")
function.
the result should be:
100 artist10xd 0 1
every line has 4 values.
please note required use regex according rules.
you can still use split(",");
the result being
split[0] == 100, split[last -1] == 0, split[last] == 1,
the rest can concatenated artistname
Comments
Post a Comment