Leif Gregory <[EMAIL PROTECTED]> @ 20-Apr-2004 4:47:03 PM "Regexp. Should be easy I think.." <mid:[EMAIL PROTECTED]>
> Ok, I love coding PHP and ASP, but regexps just really kick my > rear... Don't know why, but they do... Do you? I prefer strongly-typed, compiled languages. I find that I make far fewer mistakes. We're getting off-topic... > 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 The lines in your text should be separated by newlines, '\n'; however, on Windows, programs like Notepad don't recognize a single newline as the end of a line: they expect a carriage return followed by a newline, "\r\n". Try using a single newline to separate these and see what happens. -- Chris - Nun mi Esperanton lernas. Quoting when replying to this message is good for your karma. Using The Bat! v2.10.01 on Windows XP 5.1 Build 2600 Service Pack 1 Outside a Hotel: "Help! We need inn-experienced people."
________________________________________________________ http://www.silverstones.com/thebat/TBUDLInfo.html
