Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var regex = /[!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~]/g
- /**
- * Removes punctuation from a string.
- *
- * @param {string} string
- * @return {string}
- */
- function removePunctuation(string) {
- return string.replace(regex, '');
- }
- module.exports = removePunctuation;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement