Skip to content

Instantly share code, notes, and snippets.

@ozantunca
Last active September 6, 2020 10:12
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 ozantunca/9c041921ac2e2eac8e3865348efbbe5a to your computer and use it in GitHub Desktop.
Save ozantunca/9c041921ac2e2eac8e3865348efbbe5a to your computer and use it in GitHub Desktop.
removeFromText('lorem ipsum dolor sit amet', ' ');
// -> 'loremipsumdolorsitamet' ✅ works
removeFromText('lorem+ipsum+dolor+sit+amet', '+');
// -> throws error ❌
removeFromText('lorem+ipsum+dolor+sit+amet', '+');
// -> still throws error ❌
removeFromText('lorem+ipsum+dolor+sit+amet', '\\+');
// -> 'loremipsumdolorsitamet' ✅ works
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment