Computer >> Computer tutorials >  >> Programming >> Python

How to match any one lowercase vowel in python using Regular Expression?


We  can use the following code to match any lowercase vowel in the given string as follows

Example

import re
foo = 'AefuToiJnmna'
match = re.findall(r'[a,e,i,o,u]', foo)
print match

Output

This gives the output

['e', 'u', 'o', 'i', 'a']