The pattern [a-z]*
matches zero or more characters in the range a
to z
. There are zero such characters at the very start of the string 123 abc
(i.e. the pattern matches), and also four of them at the start of this is a line
.
If you need at least one match, then use [a-z][a-z]*
or enable extended regular expressions with sed -E
and use [a-z]+
.