home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!bonnie.concordia.ca!daily-planet.concordia.ca!alcor.Concordia.CA!gpkatch
- From: gpkatch@alcor.concordia.ca (Gary Katch)
- Newsgroups: comp.mail.mh
- Subject: Re: comapring field/strings in format strings
- Message-ID: <4615@daily-planet.concordia.ca>
- Date: 27 Jul 92 21:18:51 GMT
- Sender: usenet@daily-planet.concordia.ca
- Organization: Concordia University
- Lines: 19
- In-Reply-To: *
- "rui@r-node.gts.org (Rui M. Pereira)
- 22 Jul 92 17:34:13 GMT
- comp.mail.mh"
- <1992Jul22.173413.26902@r-node.gts.org>
- X-Mailing-Address: Computing Services C-1012
- 1455 De Maisonneuve West
- Montreal (Quebec) H3G 1M8
- X-Phone-Numbers: voice (514) 848-7632
- fax (514) 848-7622
- Originator: gpkatch@alcor
-
- Rui M. Pereira asks [*]:
- >Is it possible to do string comparisons, like the following half-pseudo-code:
- > if %{from} == "user1@site1"
- > %{cc}
- > %|
- > %{from}
-
- Yes, look up the 'match' function in the mh-format manual page.
- I use this in an mhl format to see if a message is from my local
- domain and decide which format to use for display:
-
- From:component="From",width=49,formatfield="\
- %(void{text})%<(match concordia)%(friendly{text})%|%{text}%>"
-
- This works but beware. I have reported a bug to the mh people.
- If any function which operates on an address is placed in the
- else clause above, it doesn't work.
-
- -- gk
-