This question is the inverse of this one by James Williams.
Rövarspråket
Rövarspråket is a word game played by Swedish children, from the books about Kalle Blomkvist by Astrid Lindgren.
The basic rules used during encoding are as follows (from Wikipedia):
- Every consonant (spelling matters, not pronunciation) was doubled, and an o was inserted in-between.
- Vowels were left intact.
A few examples of decoding:
- "hohelollolo" -> "hello"
- "MoMinon sosvovävovarore äror fofulollol momedod ålol" -> "Min svävare är full med ål"
Swedish consonants are the same as the English ones, so the program should work with both Swedish and English entries.
The letter "y" is taken as a consonant in this case - as most of the time it is.
Your Task:
Write a program to convert a Rövarspråket string of Swedish letters, inputted through a function or through stdin, into its decoded equivalent. Shortest answer in bytes wins!
HOHELOLLOLO
becomeHELLO
? \$\endgroup\$HoHELoLLoLO
. \$\endgroup\$o
s in the middle must be lowercase. SoHOHELOLLOLO
is not a valid input. If the input is invalid your program is allowed to do whatever, it will only be tested for valid inputs. \$\endgroup\$