Remove punctuation: https://remarkablemark.org/blog/2019/09/28/javascript-remove-punctuation/
var regex = /[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/g | |
/** | |
* Removes punctuation from a string. | |
* | |
* @param {string} string | |
* @return {string} | |
*/ | |
function removePunctuation(string) { | |
return string.replace(regex, ''); | |
} | |
module.exports = removePunctuation; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment