Hello tbtech,
Ok, I love coding PHP and ASP, but regexps just really kick my
rear... Don't know why, but they do...
At any rate, can anyone come up with a regexp to break this down:
HTTP/1.1 200 OK Date: Tue, 20 Apr 2004 17:28:23 GMT Server: SAMBAR Last-modified:
Thu, 01 Jan 2004 19:56:39 GMT Connection: close Content-type: text/html
So that I can echo it out like this:
HTTP/1.1 200 OK
Date: Tue, 20 Apr 2004 17:28:23 GMT
Server: SAMBAR
Last-modified: Thu, 01 Jan 2004 19:56:39 GMT
Connection: close Content-type: text/html
I think if I can at least see how to chop it up, then I can get it
to work with PHP preg_match_all() or preg_match().
I don't know if I should home in on the colon and then back up to
the first whitespace, or what.
My plan is to use if...then...elseif to output them regardless of
what order they get pulled out of the initial string (i.e. IIS
switches the order of the items in the original string).
And yes, I know this is a TB list. The PHP list is less than
friendly.
Thanks.
Tagline of the day:
It's is not, it isn't ain't, and it's it's, not its, if you
mean it is. If you don't, it's its. Then too, it's hers.
It isn't her's. It isn't our's either. It's ours, and
likewise yours and theirs.
-- Oxford University Press, Edpress News
--
Leif (TB list moderator and fellow end user).
Using The Bat! 2.10 RC/1 under Windows 2000 5.0
Build 2195 Service Pack 4 on a Pentium 4 2GHz with 512MB
________________________________________________________
http://www.silverstones.com/thebat/TBUDLInfo.html