procmail
[Top] [All Lists]

regex revisited

2000-12-22 15:24:12
Ok,

After a fun three days of playing with just about every regex I can think
of, I think I am on the right track.

I only have one problem, the regex below works great when I run it inside of
a stand alone perl script, but it does not work when I run it with procmail
(It only deletes the periods and nothing else).

Here is the exact text I want to delete.

## Beginning of text to delete ##
.....................................................

SUBSCRIBE

If this email has been forwarded to you, and
you wish to subscribe, simply send an e-mail to:
mailto:subscribe-k12news(_at_)k12(_dot_)com

UNSUBSCRIBE

You are currently subscribed to k12news as:
basilr(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us
To unsubscribe send a blank email to:
mailto:unsubscribe-k12news(_at_)k12(_dot_)com

.....................................................
## End of text to delete ##

Here is my script:

:0 bw : $filename.LOCKEXT
*^From:(_dot_)*k12news(_at_)k12(_dot_)com*
*^Subject:.K12 News
| perl -p -e 's/\.{10,}.*?\.{10,}//sg' | \
  tee $filename | \
  mail -s "K12 News" distro-list(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us -f
basilr(_at_)chandler(_dot_)k12(_dot_)az(_dot_)us


I know I am being a pain in the butt on this one, but I am sooo close to
getting this finished.

Thanks for any help you can provide.

---
Robert Basil - MCSE
Internet Systems Manager
Chandler Unified School District #80
1525 W. Frye Rd - Chandler AZ, 85224
Phone: 480-812-7634 / Fax: 480-812-7015
Cell: 602-570-9246 / Pager: 602-409-5992

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail