This is a text and a number: 31.
The output should contain the words with their number of occurrence, sorted by the number of occurrences in descending order:
a:2 and:1 is:1 number:1 This:1 text:1 31:1
Notice that 31 is a word, so a word is anything alpha-numeric, number are not acting as separators so for example
0xAF qualifies as a word. Separators will be anything that is not alpha-numeric including
pick-me-up would result in 2 respectively 3 words. Should be case sensitive,
this would be two different words,
' would also be separator so
t will be 2 different words from
Write the shortest code in your language of choice.
Shortest correct answer so far: