Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@stevehenderson
Last active November 21, 2016 04:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevehenderson/ee0dd92a6b7e2a03ff6ac4cbed10156c to your computer and use it in GitHub Desktop.
Save stevehenderson/ee0dd92a6b7e2a03ff6ac4cbed10156c to your computer and use it in GitHub Desktop.
How to parse this with regex:
{"unit":"101","location_z":1.012054,"location_x":0.956146,"name":"Placer(Clodde)","location_y":-0.3787908,"html":"(unset)","label":"0","type":"1","affordance_id":"453450c6-6219-4dbd-bcb7-061f3472b619"}
test here: http://regexstorm.net/tester
GETS PAIRS
(\".+?\":.+?[,}])
GET SINGLES
([\"0123456789-].+?[:,}])
CLOSE -- doesn't get numerics
(\".+?\")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment