-
2 Comments
Tom
on 11 Feb 2012
Wait... how is this:
s2 = regexprep(s1,'[aeiouAEIOU]','');
shorter than this?
s2 = s1(regexpi(s1,'[^aeiou]'));
Ben Ausdenmoore
on 15 Apr 2012
@Tom
I believe it is because the regexpi would be the same as including the 'ignorecase' option from regexprep command (including that makes the size 15).
Suggested Problems
-
341 Solvers
-
Celsius to Fahrenheit converter
628 Solvers
-
Height of a right-angled triangle
1867 Solvers
-
Is this is a Tic Tac Toe X Win?
513 Solvers
-
6454 Solvers
More from this Author96
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!