Re: Transform part of a message body

udi M <[email protected]> Mon, 18 Jan 2016 10:25:28 +0200
Newsgroups gmane.mail.procmail
Organization tau
Message-ID <[email protected]>
On 17/01/16 16:19, udi M wrote:

On 17/01/16 15:02, @lbutlr wrote:

On Jan 17, 2016, at 5:19 AM, udi M <[email protected]> wrote:

On 17/01/16 09:33, @lbutlr wrote:

I get some emails sometimes that have a long line of characters, usually used to mark a huge set of footers

Something like

============================
Text goes here

(or maybe -Â’s *Â’s or other characters.

IÂ’d like to modify a message with, say, a line of 10 or more repeated characters and change that line to be a signature delimiter.

What do you mean "signature delimiter” ?

<https://en.wikipedia.org/wiki/Signature_block#Signature_dashes>

As can be seen in all my messages.

   I could not check it now but, you can try, find line with
more then three "="s

   "^[ =]+===[= ]+$" and then count the "="s from the MATCHed:

*
15^0

    Correction, not plus 15, it is minus 15:

*Â -15^0

1^1 MATCH ?? =

   If found pipe it to sed:

| sed s/$MATCH/-- /

   Do the same with "-"s and "*"s or change the REGX to [=*-]

   One of the problems start if somebody use ascii-art to explain
you somthing

   and will write lines like this.

   If you don't care performance use the sed to figure-out instea
of procmail:

 sed "s/^[ ]*=\{15,\}[ ]*$/-- /"

--Udi

vv right here

____________________________________________________________
procmail mailing list Procmail homepage: http://www.procmail.org/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
[email protected]
http://mailman.rwth-aachen.de/mailman/listinfo/procmail