[자바스크립트로 구현한 알고리즘] Disemvowel Trolls

남양주개발자

·

2016. 9. 17. 16:55

728x90
반응형


Trolls are attacking your comment section! A common way to deal with this situation is to remove all of the vowels from the trolls' comments, neutralizing the threat. Your task is to write a function that takes a string and return a new string with all vowels removed. For example, the string "This website is for losers LOL!" would become "Ths wbst s fr lsrs LL!".



모음만 제거하는 예제다. 정규표현식 /[aeiou]/ gi(대소문자 구별x)를 통해서 쉽게 구현이 가능하다.

728x90
반응형
그리드형

💖 저자에게 암호화폐로 후원하기 💖

아이콘을 클릭하면 지갑 주소가자동으로 복사됩니다