Skip to content

Instantly share code, notes, and snippets.

@hernamesbarbara
Created October 10, 2012 18:39
Show Gist options
  • Save hernamesbarbara/3867571 to your computer and use it in GitHub Desktop.
Save hernamesbarbara/3867571 to your computer and use it in GitHub Desktop.
google regular expression helpers
#extract words in parens from a string
value.match(/(.+)\((.*)\)(.+)/)[1].split(' ')[1]

#replace the following characters with empty string:  , .  - ( )
toUppercase(value).replace(/\,|\.|\-|\(|\)|\[|\]/, '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment