I am studying regular expressions and I am stumped. Here is my process so far....I downloaded this file.wget http://www.mieliestronk.com/corncob_lowercase.txtmv corncob_lowercase.txt words.txtI wanted all 3 letter words...grep '^...$' words.txtThis DOES finds abegrep '^abe.$' words.txtThis does NOT find abegrep '^abe$' words.txtThis DOES find abe in the library that came with Arch Linux.grep '^abe$' /usr/share/dict/cracklib-smallI am stumped on this one.
Using regular expressions to search a word list. Finding 2 letter words instead of 3. Why?
text processing;grep;regular expression
$ file corncob_lowercase.txt corncob_lowercase.txt: ASCII text, with CRLF line terminatorsProbably the DOS line endings are the source of your problem.  CR is counting as a character for at least some purposes.Run it through dos2unix, or tr -d '\r', before greping.