Javascript Regex to split line by comma -


i want regex expression javascript should split line comma , should not split expressions inside brackets

eg:

builtinfunctions.replace_first,type.string, type.string, 2, getargtypeins(type.string, type.string, type.boolean)  

to

builtinfunctions.replace_first type.string type.string 2 getargtypeins(type.string, type.string, type.boolean) 

this regex split commas, except followed brackets:

/,(?![^(]*\))/m 

demo


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -