Cody

Solution 505585

Submitted on 26 Sep 2014 by goc3
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
%% inStr = 'Cedric loves regular expressions' ; output_correct = {'Cedric', 'regular'} ; assert(isequal(getWordsSameStartEnd(inStr),output_correct))

t2 = Cedric c = 1 outStr = 'Cedric' t2 = loves t2 = regular c = 2 outStr = 'Cedric' 'regular' t2 = expressions

2   Pass
%% inStr = 'Single neuron Cedric, Anna-Maria, Andrei, a koala' ; output_correct = {'neuron', 'Cedric', 'Anna-Maria'} ; assert(isequal(getWordsSameStartEnd(inStr),output_correct))

t2 = Single t2 = neuron c = 1 outStr = 'neuron' t2 = Cedric c = 2 outStr = 'neuron' 'Cedric' t2 = Anna-Maria c = 3 outStr = 'neuron' 'Cedric' 'Anna-Maria' t2 = Andrei t2 = a t2 = koala

3   Pass
%% inStr = '__dEdiCaTeD__, REGULAR_EXPRESSION.. Rotor-1 and abracadabra' ; output_correct = { 'dEdiCaTeD', 'REGULAR', 'abracadabra'} ; assert(isequal(getWordsSameStartEnd(inStr),output_correct))

t2 = dEdiCaTeD c = 1 outStr = 'dEdiCaTeD' t2 = REGULAR c = 2 outStr = 'dEdiCaTeD' 'REGULAR' t2 = EXPRESSION t2 = Rotor-1 t2 = and t2 = abracadabra c = 3 outStr = 'dEdiCaTeD' 'REGULAR' 'abracadabra'

Suggested Problems

More from this Author1