Skip to content

Instantly share code, notes, and snippets.

@jbaxleyiii
Created July 13, 2014 18:53
Show Gist options
  • Save jbaxleyiii/f6b15218c728c1540fba to your computer and use it in GitHub Desktop.
Save jbaxleyiii/f6b15218c728c1540fba to your computer and use it in GitHub Desktop.
Regex to split string by commas unless in array or object
/[,](?=[^\]]*?(?:\[|$))(?=[^\}]*?(?:\{|$))/g
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment