Cody

Problem 541. Use of regexp

Solution 196395

Submitted on 25 Jan 2013 by Alfonso Nieto-Castanon
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% x = 'I played piano. John played football. Anita went home. Are you safe?'; y = {'I played piano.' 'Anita went home.' 'Are you safe?'}; assert(isequal(lazy(x),y))

ans = 'I played piano.' 'Anita went home.' 'Are you safe?'

2   Pass
%% x = 'Are you okay? Who are you? Olga will call you. Sam saw me.'; y = {'Olga will call you.'}; assert(isequal(lazy(x),y))

ans = 'Are you okay?' 'Olga will call you.'

Suggested Problems

More from this Author100

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!