Grep Regular Expression in Cygwin
===

I am using Cygwin on Windows. I want to extract all the lines from a file which contain exactly 9 letters in the name.

To do this, I am using:

    cat filename.txt | grep -P "[a-z]{9}"

however this is also returning words of different case and lengths greater than 9.

I have even set the environment variable, LC_ALL to C.

I am able to make this work though:

cat filename.txt | grep -P "^[a-z]*[a-z]$"

And this displays only words with lowercase characters.

Please note that I am running the commands in Cygwin and I have observed that there are certain differences between Cygwin and a Linux Distro. The commands do not work the same way.