DEV Community

Discussion on: Daily Challenge #148 - Disemvowel Trolls

Collapse
 
rafaacioly profile image
Rafael Acioly

Python solution 🐍

import re

VOWELS_REGEX = r"[aeiou]"

def removeVowels(message: str) -> str:
  return re.sub(VOWELS_REGEX, '', message, flags=re.IGNORECASE)