From: wmorgan-sup@masanjin.net (William Morgan)
Subject: [sup-talk] Choose "From:" address based on message content?
Date: Mon, 27 Jul 2009 09:53:58 -0700 [thread overview]
Message-ID: <1248713574-sup-6167@entry> (raw)
In-Reply-To: <1248317360-sup-4094@sgoldmanlinux.tower-research.com>
Reformatted excerpts from Steve Goldman's message of 2009-07-22:
> require 'eregex'
>
> r = Regexp.new('word', Regexp::IGNORECASE);
> if header.to_s.grep(r).size > 0 or body.to_s.grep(r).size > 0
You can just use body.to_s =~ /word/i || header.join =~ /i/. No need for
all the fancy libraries and method calls.
--
William <wmorgan-sup at masanjin.net>
next prev parent reply other threads:[~2009-07-27 16:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-23 1:10 Steve Goldman
2009-07-23 2:51 ` Steve Goldman
2009-07-27 16:53 ` William Morgan [this message]
2009-07-27 16:52 ` William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1248713574-sup-6167@entry \
--to=wmorgan-sup@masanjin.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox