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

PythonServer Side ProgrammingProgramming

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']
raja
Updated on 18-Feb-2020 10:12:17

Advertisements