MATLAB: How to read only vowels of a string

vowels

How can I read only vowels of a string by using regular expression in matlab. Thanks in advance.

Best Answer

>> regexprep('How to read only vowels of a string?', '[^aeiouAEIOU]', '')
ans =
'ooeaooeoai'
>> char(regexp('How to read only vowels of a string', '[aeiouAEIOU]', 'match'))'
ans =
'ooeaooeoai'
(edit) No longer ignoring capitals!