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 -

android - IBM Worklight 6.1 [Application Error] There was a network error (file:///android_asset/www/index.html) -