I'm stuck with this regex.
So, I have input as:
- "Crane device, (physical object)"(X1,x2,x4), not "Seen by research nurse (finding)", EntirePatellaBodyStructure(X1,X8), "Besnoitia wallacei (organism)", "Catatropis (organism)"(X1,x2,x4), not IntracerebralRouteQualifierValue, "Diospyros virginiana (organism)"(X1,x2,x4), not SuturingOfHandProcedure(X1)
and in the end I would like to get is:
- "Crane device, (physical object)"(X1,x2,x4)
- not "Seen by research nurse (finding)"
- EntirePatellaBodyStructure(X1,X8)
- "Besnoitia wallacei (organism)"
- "Catatropis (organism)"(X1,x2,x4)
- not IntracerebralRouteQualifierValue
- "Diospyros virginiana (organism)"(X1,x2,x4)
- not SuturingOfHandProcedure(X1)
I've tried regex
(\'[^\']*\')|(\"[^\"]*\")|([^,]+)|\\s*,\\s*
It works if I don't have a comma inside parentheses.