Skip to content

Instantly share code, notes, and snippets.

@MaxMatti
Last active October 24, 2016 14:27
Show Gist options
  • Save MaxMatti/ea43c0c38446d235ff9bb1ef3f3678e5 to your computer and use it in GitHub Desktop.
Save MaxMatti/ea43c0c38446d235ff9bb1ef3f3678e5 to your computer and use it in GitHub Desktop.
This takes the definition from any wikipedia page and counts the number of special characters of the german language (ä,ö,ü,ß).
(document.getElementById("mw-content-text").children[1].textContent.match(/(ä|ö|ü|ß)/ig) || []).length;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment