in reply to Removing all non 8 letter words from the dict/words file

What would I need to print only words that do not include a capital letter, number, -, or period?
Thatks for all of the help so far.
Creating chaos out of order.
  • Comment on Re: Removing all non 8 letter words from the dict/words file

Replies are listed 'Best First'.
Re^2: Removing all non 8 letter words from the dict/words file
by QM (Parson) on Apr 09, 2006 at 23:55 UTC
    Read perlre!!!

    Only words that do not include a capital, number, dash, or period:

    while (<>) { print if /^[^A-Z0-9.-]+$/; }
    However, it's usually much easier to list the things you can include.

    -QM
    --
    Quantum Mechanics: The dreams stuff is made of

      the only problem with that is that the lines that I want to include have only 1 thing different than the words I want:
      They are all lower case
      ...so I didn't think you could use lower case to sort the words.
      But by all means feel free to prove me wrong.
      Creating chaos out of order.
        Only lower case:
        while (<>) { print if /^[a-z]+$/; }

        -QM
        --
        Quantum Mechanics: The dreams stuff is made of

        I really don't understand what you mean by:
        the only problem with that is that the lines that I want to include have only 1 thing different than the words I want
        Could you please rephrase it? Also, you should really do what QM suggests, and read perlre, or even perlretut. They really do help, and it doesn't look like you have read either yet.