Skip to content

Instantly share code, notes, and snippets.

@mertenvg
Created June 24, 2013 08:33
Show Gist options
  • Save mertenvg/5848586 to your computer and use it in GitHub Desktop.
Save mertenvg/5848586 to your computer and use it in GitHub Desktop.
Converting option tags to json with regex

Converting option tags to json with regex

find    : <option [^>]*?value="([^"]+)"[^>]*>([^<]*)</option>
replace : "$1" : "$2",

Done!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment