procmail
[Top] [All Lists]

Re: Truncating STILL not working

1996-05-29 02:19:53
-----BEGIN PGP SIGNED MESSAGE-----

On Tue, 28 May 1996, Gino Filicetti wrote:

   :0
   * NAME ?? .
   * NAME ?? ^\/.{1,25}  <<<<<<<<<<<<<<<<<<<<<<<<---------------
   { NAME = $MATCH }
   :0E
   { NAME = "$FROM_ADDRESS" }

procmail: No match on "^^\/.{1,25}"
procmail: Assigning "NAME= ginof(_at_)io(_dot_)org"

See that? is that syntax wrong or something? (I don't even know WHERE you
got that from, what do the ?? and ^^ and {1,25} mean?)

The ?? tells procmail to search the environment variable NAME, the ^^ 
matches the beginning of the variable, and the .{1,25} should match 1 to 
25 characters.
I looked at the procmailrc and regexp man pages. It looks like procmail 
doesn't understand the {} syntax. 
Basic regular expressions require \{ and \}, but that doesn't work 
either. (I have procmail 3.10)

Let's see if I can work around it:

NAME=`echo "$NAME" | sed -e 's/^.\{1,25\}(.*)$//'`

I hope this works.

- --
Guy Geens <guy(_dot_)geens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be>: Ph.D. 
student at ELIS -- TFCG / IMEC 
Home Page: http://www.elis.rug.ac.be/ELISgroups/tfcg/staff/gg.html 
finger ggeens(_at_)elis(_dot_)rug(_dot_)ac(_dot_)be for PGP public keys (or use 
keyserver) 

"Psychedelic drugs cause paranoia, confusion, and total loss of
reality in politicians who have never taken them."



-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: pgp fingerprints in message headers

iQBVAwUBMawVBXwHoCha5QR1AQGWbAH+I8dGHB8e69lf7pn2GW+H3Px9t2VDCBLq
Jh4J8lWCr/mfadp+Sct0hfjdAKnAcaDWti5ICNybSTTA13HRaM8eGA==
=kGXQ
-----END PGP SIGNATURE-----

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