Shaner Yo writes:

> Hello,
> 
> I'm starting to use cygwin with grep command. Using curly braces with a
> regex pattern is not working, even when I escape it. What am I doing
> wrong?

Hi,

The curly braces are part of extended regular extension (ERE) syntax,
not basic regular expression (BRE) syntax.  The "grep" program assumes
BRE syntax, while the "egrep" program assumes ERE syntax.  So you want
to use egrep, like

egrep '0{4}'

Also, you should probably use quotes around your regular expressions
(as a simpler alternative to escaping symbols), so that your shell
doesn't interpret the curly braces or other punctuation inside the
regular expression specially.

-- 
Seth David Schoen <[email protected]>      |  No haiku patents
     http://www.loyalty.org/~schoen/        |  means I've no incentive to
  FD9A6AA28193A9F03D4BF4ADC11B36DC9C7DD150  |        -- Don Marti

Reply via email to