Problem 1376. Find names/words that start and end with the same letter.

Find names/words (from a string) that start and end with the same letter.

  • Case-insensitive.
  • If a name/word is not at the end of the string, it can be followed by a white-space or a comma.
  • Names/words contain only letters or dashes.
  • Underscores are NOT considered as letters. Words separated by underscores count as distinct words, e.g. in 'NAN_CONST' the 'NAN' is matched.
  • Words are at least two letters long, so e.g. 'a' is not matched.

Example:

 in  = 'Cedric loves regular expressions'
 out = {'Cedric', 'regular'}

Solution Stats

36.11% Correct | 63.89% Incorrect
Last Solution submitted on Oct 25, 2022

Problem Comments

Solution Comments

Show comments

Problem Recent Solvers36

Suggested Problems

More from this Author1

Problem Tags

Community Treasure Hunt

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

Start Hunting!