Skip to content

Instantly share code, notes, and snippets.

@remitbri
Last active September 30, 2015 20:57
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 remitbri/1860928 to your computer and use it in GitHub Desktop.
Save remitbri/1860928 to your computer and use it in GitHub Desktop.
JS - to strike letters & digits in a text
textToBeStriked.replace(/[a-zA-Z0-9À-ÿ]/g, "$&\u0336")
@remitbri
Copy link
Author

Why [a-zA-Z0-9À-ÿ] and not \w|[À-ÿ] ? Because I don't like the underscore to be striked…

@remitbri
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment