Setup
Trolls are invading the comment section!
To deal with the threat, write a function that takes a string and returns a new string with all vowels removed (y
not included).
Example
"This website is for losers LOL!"
=> "Ths wbst s fr lsrs LL"
Tests
"No newbies allowed, go to #beginners"
=>
"LULZ TROLLED"
=>
Try to keep it simple. Have fun!
This challenge comes from osuushi on CodeWars. Thank you to CodeWars, who has licensed redistribution of this challenge under the 2-Clause BSD License!
Want to propose a challenge idea for a future post? Email yo+challenge@dev.to with your suggestions!
Top comments (15)
In C#
Or may be just
var cleaned = Regex.Replace(input,"[aeiou]", "", RegexOptions.IgnoreCase);
Nice One!
In Ts:
Python solution.
you could use
regex
to keep it simple :)I am yet to study about regexes :)
Here's a Ruby submission!
Here's a link to the Repl.it: repl.it/@rburmorrison/DevToChallen...
Standard ML of New Jersey Solution
Elm
Example.
Liquid syntax error: Unknown tag 'def'
Ruby:
Some unfancy Common Lisp:
JS
const disemvowel = (str) => str.replace(/[aeoiu]/gi, '');