Cody

Solution 506446

Submitted on 29 Sep 2014 by James
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))

x = 'Cedric' 'loves' 'regular' 'expressions' y = 'cedric' 'loves' 'regular' 'expressions' p = {}

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

x = 'Single' 'neuron' 'Cedric' 'Anna-Maria' 'Andrei' 'a' 'koala' y = 'single' 'neuron' 'cedric' 'anna-maria' 'andrei' 'a' 'koala' p = {}

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

x = '' 'dEdiCaTeD' 'REGULAR' 'EXPRESSION..' 'Rotor-1' 'and' 'abracadabra' y = '' 'dedicated' 'regular' 'expression..' 'rotor-1' 'and' 'abracadabra' p = {}