I have a variable in PHP which holds a large text (an E-mail header to be precise).
I want to get 2 things out of this header. Here is a sample header:
Received: by mozg.ha.domain.net (Postfix, from userid 0)
id E714C9AEDE; Tue, 29 Mar 2011 10:22:42 +0200 (CEST)
Subject: This is some text before hs34940.somedomain.tld
X-internal-Template: mozg/de/shipping.model
Now, from this text, I want to get 2 variables. One containing hs34940.somedomain.tld and the other one the 4 last digits of the number, in this case 4940. The length of the digits is variable.
I have got this currently in the variable $header, and I'd love to get $number and $name out of it.
Any help is greatly appreciated.