I have a string like this: R3(a1b1,a1c1,b2c1), or R3(a1b1,a1c1,b2c1).
I want to split it into two arrays [R3] and [a1b1,a1c1,b2c1].
I tried some naive ways such as String line1[] = line.replaceAll("\\(", ",").replaceAll("\\)", "").replaceAll("\\.", "").split(","); to split the string into an array and then split the array but it doesn’t work.
I have a string like this: R3(a1b1,a1c1,b2c1), or R3(a1b1,a1c1,b2c1). I want to split it
Share
Your regexs should be