Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

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

Created by Cedric Wannaz

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.


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

Problem Group

Solution Statistics

27 correct solutions 25 incorrect solutions
Last solution submitted on May 21, 2015

Problem Comments

Solution Comments