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
Published on 02-Jan-2018 09:39:03
Advertisements