Skip to content

Instantly share code, notes, and snippets.

@ecotg
Last active May 24, 2016 21:58
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 ecotg/f705e00c2b5cbfe605dc6ca23d063ea9 to your computer and use it in GitHub Desktop.
Save ecotg/f705e00c2b5cbfe605dc6ca23d063ea9 to your computer and use it in GitHub Desktop.
Quick code tips - Javascript edition
// Find all occurences
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36'.match(/\((.*?)\)/g)
[ '(Macintosh; Intel Mac OS X 10_7_5)', '(KHTML, like Gecko)' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment