Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!sdd.hp.com!ucsd!ucbvax!iwarp.intel.com!news From: merlyn@iwarp.intel.com (Randal Schwartz) Newsgroups: comp.lang.perl Subject: Re: Pattern that will match Received: lines in an RFC822 header Message-ID: <1990Aug23.180545.20030@iwarp.intel.com> Date: 23 Aug 90 18:05:45 GMT References: <1990Aug21.135624.4354@DRD.Com> Sender: news@iwarp.intel.com Reply-To: merlyn@iwarp.intel.com (Randal Schwartz) Organization: Stonehenge; netaccess via Intel, Beaverton, Oregon, USA Lines: 23 In-Reply-To: mark@DRD.Com (Mark Lawrence) In article <1990Aug21.135624.4354@DRD.Com>, mark@DRD (Mark Lawrence) writes: | Can somebody e-mail me a pattern that will match lines beginning with | Received: and the next line iff it begins with whitespace? E-mail would | be fine, though I _do_ read this group religiously (don't ya just hate | drop-ins?). If the whole header is in $_, and $* is non-zero, something like: /^Received:.*(\n\s+.*)*\n/ should work. If you are trying to do something from <>, it'll be trickier -- so tricky that I can't think of a non-kludge way to do it in the 45 seconds I had to respond to this message (maybe I'll come up with it during the JAPH :-). $_ = "hacker, Perl another"; / .* /; print "Just $'$&$`" -- /=Randal L. Schwartz, Stonehenge Consulting Services (503)777-0095 ==========\ | on contract to Intel's iWarp project, Beaverton, Oregon, USA, Sol III | | merlyn@iwarp.intel.com ...!any-MX-mailer-like-uunet!iwarp.intel.com!merlyn | \=Cute Quote: "Welcome to Portland, Oregon, home of the California Raisins!"=/