Did you say please? - Find one string within another without strfind or regexp/regexpi - MATLAB Cody - MATLAB Central

Problem 2602. Did you say please? - Find one string within another without strfind or regexp/regexpi

Difficulty:Rate

For a given string sentence, determine if the string word 'please' is present or not. If so, return the string 'OK', else return '...'. The function should not be case sensitive. Please do not use the strfind or regexp/regexpi functions in your solution.

Example:

reply = please('Help me with my homework!')
reply = '...'
reply = please('Please help me with my homework')
reply = 'OK'

Solution Stats

27.19% Correct | 72.81% Incorrect
Last Solution submitted on Feb 25, 2025

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers56

Suggested Problems

Problem Tags

Community Treasure Hunt

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

Start Hunting!
Go to top of page