Find all words with 3 letters with regex

You should use your match with word boundaries instead of anchors:

\b[a-zA-Z]{3}\b

RegEx Demo

When you use:

^[a-zA-Z]{3}$

It means you want to match a line with exact 3 letters.

Leave a Comment