Site icon Bytefreaks.net

How to find lines that contain only lowercase characters

Advertisements

To print all lines that contain only lower case characters, we used the following regular expression in grep:


egrep '^[[:lower:]]+$' <file>;
#If you do not have egrep, use
grep -e '^[[:lower:]]+$' <file>;

Breakdown of the above regular expression:

This post is also available in: Greek

Exit mobile version