I want to match ": red", ": 10", ": [special]" only if category present before (I want to use replace function to get rid of them afterwards)
category fruit(color: red, size: 10, others: [special])
I have this regex for above
(((:\s*[\w\[\]] )(?=[,\)])) )
except for category, I can't seem to be able to use lookbehind for that.
CodePudding user response:
If we take the the following input verbatim