Re: grep: match i to j occurences of abc

From: Penna Elabi (terebinthus_at_go.com)
Date: 08/31/03

  • Next message: Erik Max Francis: "Re: grep: match i to j occurences of abc"
    Date: 30 Aug 2003 23:51:52 -0700
    
    

    Erik Max Francis <max@alcyone.com> wrote in message news:<3F511483.5E185940@alcyone.com>...
    >
    > It works fine with a pattern and egrep; on the contrary, grep is exactly
    > the right tool for the job. (Duh on you.) The regular expression he
    > wants is:
    >
    > grep '^(abc ?){3,5}$' test

    Thanks! Works great with egrep (but not with grep (Digital UNIX V4.0G)).


  • Next message: Erik Max Francis: "Re: grep: match i to j occurences of abc"

    Relevant Pages

    • Re: Fraudulent eBay listing
      ... O.K. I had not noticed that you were using plain grep, ... in egrep), * simply stands for "zero or more of the preceding ... Interpret PATTERN as an extended regular expression. ...
      (rec.crafts.metalworking)
    • Re: Text Editor
      ... > I was wondering if there is a text editor equivalent to TextPad for ... See the man pages for grep, egrep, fgrep. ... I tend to just use egrep and the simple regular expressions. ... " Grep understands two different versions of regular expression ...
      (Fedora)
    • Re: simple regular expression question
      ... I am trying to come up with a regular expression, ... and i would like to egrep to allow only lines that DO NOT have the text ... option you could give grep to have it display only lines not matching ... Nobody can fix the economy. ...
      (comp.unix.questions)
    • Logical AND in egrep using Regular Expression.
      ... I have been trying to use Logical NOT and AND in the regular expression ... used in greping. ... grep and egrep doesn't have Logical AND. ...
      (comp.unix.shell)
    • Re: Python MAPI
      ... registry edits, so I disabled my filters and ran it without. ... egrep - which is a more powerful version of grep; ... "pattrn" which looks in parallel for pattern1, patturn1, ...
      (comp.lang.python)