procmail
[Top] [All Lists]

Re: $MATCHing on the left

1999-09-04 16:06:34
On Fri, 3 Sep 1999, Stan Ryckman wrote:

} [snip perl script--yuk]

?? I didn't include any perl in my posting. 

} I'm not entirely clear here on exactly what you want... the first
} "word" or the first five characters.  I'll do it for the case
} where you want the first "word" and the rest are known.  Hopefully

The first word and the first 5 chars are one and the same. The text will
always have one of a few alpha chars, followed by a 4-digit number; eg:
x1999

} # This gets the first "word" into $MATCH where you know the rest
} # of the words:

[snip the solution recipe]

} text.  The second will then perforce match, but set $MATCH only
} to the "one or more non-blanks" part of what satisfied the
} first condition ("w2000" in your example).

Aaaah. The 2nd one was what I was leaving off in my attempts. I did the
$MATCH on the first line, so it matched the entire subject, not just the
first 5 chars.

} ><using v3.10pre4 fyi>
} 
} You really should upgrade.

Made a typo..should of read: v3.10. I have no control over upgrading. I do
run 3.11pre4 on a couple of other unix boxes, but the one that this recipe
will run on uses smrsh, so I can't even install it in my own $HOME/bin. :( 
I have suggested upgrading to 3.11pre4 for the last few years, but...[i
know that 3.11pre4 isn't the current release, but it is a step in the
right direction].

} Hope that helps,

Yep! It solved the problem perfectly! Thanks. 

/vjl/

-- 
Vince J. LaMonica    // T e a m    // Photographer: aviation, sports,
vjl(_at_)cullasaja(_dot_)com \XX/ A M I G A  // nature, art, travel, documentary

       This e.mail was composed on Sep 4, 1999 at 3:53pm PDT.


<Prev in Thread] Current Thread [Next in Thread>