At 15:05 2003-12-15 -0600, Nick wrote:
I Perl, Sed, etc..
^Bob will only grep a sentence with
In order to get something that starts with Bob and contains characters
"Bob and Sue"
which means Bob and zero or more of any other character that is not a
"^Bob" will happily match in "Bob and Sue" in procmail, grep, perl and
sed. In fact, "^Bob.*" will match "Bob" or "Bob and Sue" equally well, but
what is returned or operated on will differ.
If you want to _capture_ or _replace_ the text beyond Bob, then the regexp
will differ depending upon the operation. If you're only interested that
Bob is there, then ^Bob suffices. If you want Bob, but NOT Bob and Sue, or
Bobby, you need a regexp crafted to that purpose.
The chief differences in regexp syntax are for the _extended_ regexps, as
well as for grouping and replacement (which neither procmail or grep even
> Ask yourself why you're creating an X-(whatever) header. If it's for
> looping, you should be using X-Loop:, since certain tools have SPECIFIC
> support for retaining that on replies.
I don't want to really go into the purpose on the Procmail list. Suffice
to say it solves a corporate problem.
I can think of better ways to "solve a corporate problem" without relying
on inserting something with a name token which can be associated with an
individual party just by looking at it, and which could (esp if they're an
employee) result in unwanted legal action. An encoded header (consisting
of X-yourcompanyname: series_of_characters - say which are a manually
processed BASE64 encoding of the target name, or even just some numeric,
since you may not be tracking multiple parties with this anyway, strikes me
as a netural method which doesn't reveal anything unusual to someone who
might examine the message and take offence at finding their name in them in
But hey, it's your employer and your problem. I'm just dispensing free advice.
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
procmail mailing list