Skip to content

Instantly share code, notes, and snippets.

@midnightcodr
Created August 23, 2018 13:37
Show Gist options
  • Save midnightcodr/37d33cce0fe9e1643960f3fa3a459b15 to your computer and use it in GitHub Desktop.
Save midnightcodr/37d33cce0fe9e1643960f3fa3a459b15 to your computer and use it in GitHub Desktop.
// handy function to strip the plusing part of a email address with +
const stripPlusing = em => em.replace(/\+[^@]+/, '')
console.log(stripPlusing('[email protected]'))
console.log(stripPlusing('[email protected]'))
console.log(stripPlusing('[email protected]'))
/*
[email protected]
[email protected]
[email protected]
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment