Wait... how is this:
s2 = regexprep(s1,'[aeiouAEIOU]','');
s2 = s1(regexpi(s1,'[^aeiou]'));
@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).
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
s1 = 'Jack and Jill went up the hill';
s2 = 'Jck nd Jll wnt p th hll';
assert(isequal(s2,refcn(s1)))
|
2 | Pass |
%%
s1 = 'I don''t want to work. I just want to bang on the drum all day.';
s2 = ' dn''t wnt t wrk. jst wnt t bng n th drm ll dy.';
assert(isequal(s2,refcn(s1)))
|
Rotate and display numbered tile
221 Solvers
Get the elements of diagonal and antidiagonal for any m-by-n matrix
196 Solvers
202 Solvers
304 Solvers
Is this triangle right-angled?
1918 Solvers