Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
JS - to strike letters & digits in a text
textToBeStriked.replace(/[a-zA-Z0-9À-ÿ]/g, "$&\u0336")
@remitbri
Copy link
Author

remitbri commented Feb 18, 2012

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

@remitbri
Copy link
Author

remitbri commented Feb 18, 2012

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