[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Grep on dictionary words

On Sun, Nov 29, 2009 at 01:22:15AM +0200, Dotan Cohen wrote:
> > will get the ones that start with capital alphas. if you want initial
> > caps *only* then:
> >
> > grep "^[A-Z][a-z]*$"
> >
> > would match those.
> >
> Thanks. I meant that caps could only be at the beginning of a word,
> not in the middle. Expanding your example, I figured that would be:
> grep "^[A-Z]?[a-z]*$"  // note the question mark

That's clearly a false statement. Here's a snippet from 'strings

l$ L
Usage: %s [ignored command line arguments]
  or:  %s OPTION
Exit with a status code indicating failure.
      --help     display this help and exit
      --version  output version information and exit
NOTE: your shell may have its own version of %s, which usually
the version described here.  Please refer to your shell's documentation
for details about the options it supports.
Report bugs to <%s>.
Jim Meyering
GNU coreutils
%s (%s) %s
Written by %s.
Written by %s and %s.
Written by %s, %s, and %s.

Tzafrir Cohen         | tzafrir@jabber.org | VIM is
http://tzafrir.org.il |                    | a Mutt's
tzafrir@cohens.org.il |                    |  best
ICQ# 16849754         |                    | friend

Reply to: