I want to remove all the vowels from the string.
but the following code doesn't work.
Instead I need to put escape character before ^
i.e obj=re.compile(r'[\^aeiouAEIOU]')
import re
def disemvowel(string):
obj=re.compile(r'[^aeiouAEIOU]')
k=obj.sub('',string)
return k
s='This website is for losers LOL!'
print( disemvowel(s) )
obj=re.compile(r'[aeiou]', re.I)