Python - find text starts with vowel

Published on
1 mins read
––– views

For client-side only, not work in Node.js

Find a string starts with vowel in a sentence.

text = "A simple life is a happy and awesome for me."
import re
print(re.findall(r'\b[(aeiou)].*?\b', text.lower()))

Output:

['a', 'is', 'a', 'and', 'awesome']