Skip to content

Instantly share code, notes, and snippets.

@HerbertLim
Created December 29, 2019 10:59
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 HerbertLim/c6e51485b6dc690f0d0e73de2d2e6b1c to your computer and use it in GitHub Desktop.
Save HerbertLim/c6e51485b6dc690f0d0e73de2d2e6b1c to your computer and use it in GitHub Desktop.
A regular expression when removing space, comman, (, and ) from given string
const newString = _.replace(givenString, /\(|\)|\s|,/g, '')
const newString2 = givenString.replace(/\(|\)|\s|,/g, '')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment