Find the answer to your Linux question:
Results 1 to 2 of 2
As expected, but of these two commands work... # cat test.msg | egrep -e "name=\"[a-z][a-z]\.zip\"" name="vo.zip" filename="vo.zip" # cat test.msg | egrep -e "name=\"[a-z]{1,2}\.zip\"" name="vo.zip" filename="vo.zip" However, in my procmail ...
  1. #1
    Banned
    Join Date
    Dec 2002
    Location
    Texas
    Posts
    242

    Regex failing in Procmail recipe

    As expected, but of these two commands work...

    # cat test.msg | egrep -e "name=\"[a-z][a-z]\.zip\""
    name="vo.zip"
    filename="vo.zip"

    # cat test.msg | egrep -e "name=\"[a-z]{1,2}\.zip\""
    name="vo.zip"
    filename="vo.zip"

    However, in my procmail recipe, only the 1st one works...

    # cat test.log | grep name
    procmail: Score: 0 -1 "name=\"[a-z]{1,2}\.zip\""
    procmail: Score: 2 1 "name=\"[a-z][a-z]\.zip\""

    Does the {x,y} function of regex's not work in procmail recipes?

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    No, it does not. I just examined regexp.c in the procmail source.
    --
    Bill

    Old age and treachery will overcome youth and skill.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...