Re: Regular Expressions http error code

2003-03-14 Thread Rob Dixon
Hi Derek. Derek Romeyn wrote: > Using your idea I ended up with data like this. Which is odd because > the database should only include 400 and 500 type errors. > [snip] > > 404 24.54.175.153 - - [11/Mar/2003:07:48:37 -0800] "GET > /e/t/invest/img/spacer.gif HTTP/1.1" 404 0 "https:// > 370

Re: Regular Expressions http error code

2003-03-13 Thread R. Joseph Newton
"R. Joseph Newton" wrote: ... an integer, followed by a *backslash*. # HTTP\d+\/ > There will be something on the other side of the *backslash*, to identify > subversion. Let's not count baskslash? Did somebody say "backslash"? Huh? I didn't hear anything. <| 8-O ) Joseph -- To unsubsc

Re: Regular Expressions http error code

2003-03-13 Thread R. Joseph Newton
"Romeyn, Derek" wrote: So I went ahead and modified it to print the code and the dataline and got Hi Derek, Take some time here to look at the string, and think about how you know which part is the error code. Is it just because you find a space after "HTTP"? It seems to me that there are some

RE: Regular Expressions http error code

2003-03-13 Thread david
Derek Romeyn wrote: > Using your idea I ended up with data like this. Which is odd because the > database should only include 400 and 500 type errors. > > 176 > 404 > 370 > 157 > 404 > 370 > 526 > 178 > 176 > 404 > 526 > 526 > > So I went ahead and modified it to print the code and the dataline

RE: Regular Expressions http error code

2003-03-13 Thread Scott R. Godin
Derek Romeyn wrote: > K, I tried this and it didn't work as expected: > > $code =~ / HTTP\/\d\.\d\" (\d+)/; > if (!$code) { > print "NEXT\n"; > next; > } > print "$code\n"; > > > The loop just printed NEXT 300 or so times. I was t

Re: Regular Expressions http error code

2003-03-12 Thread R. Joseph Newton
"Romeyn, Derek" wrote: > K, I tried this and it didn't work as expected: > > $code =~ / HTTP\/\d\.\d\" (\d+)/; > if (!$code) { > print "NEXT\n"; > next; > } > print "$code\n"; > > The loop just printed NEXT 300 or so times. I was thi

RE: Regular Expressions http error code

2003-03-12 Thread Romeyn, Derek
ariations though. Derek -Original Message- From: Brett W. McCoy [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 11:02 AM To: Romeyn, Derek Cc: 'George P.'; '[EMAIL PROTECTED]' Subject: RE: Regular Expressions http error code On Wed, 12 Mar 2003, Brett W. McCoy wrot

RE: Regular Expressions http error code

2003-03-12 Thread Brett W. McCoy
On Wed, 12 Mar 2003, Brett W. McCoy wrote: > You're not capturing the correct string. Here's a code snippet I just > tried on an Apache log that worked (assuming you have an open file > handle): > > while() { > print "$1\n" if m|HTTP.*\s+(\d{3})|g'; > } > > $1 contains the matched string in

RE: Regular Expressions http error code

2003-03-12 Thread George P.
ot;NEXT\n"; next; } bye, George P. > > > > > > > -Original Message- > From: George P. [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 12, 2003 9:48 AM > To: Romeyn, Derek > Cc: '[EMAIL PROTECTED]' > Subject: Re: Regular Expres

RE: Regular Expressions http error code

2003-03-12 Thread Brett W. McCoy
On Wed, 12 Mar 2003, Romeyn, Derek wrote: > K, I tried this and it didn't work as expected: > > $code =~ / HTTP\/\d\.\d\" (\d+)/; > if (!$code) { > print "NEXT\n"; > next; > } > print "$code\n"; > > > The loop just printed NEXT 300 or

RE: Regular Expressions http error code

2003-03-12 Thread Dan Muey
> > K, I tried this and it didn't work as expected: > > $code =~ / HTTP\/\d\.\d\" (\d+)/; > if (!$code) { > print "NEXT\n"; > next; > } > print "$code\n"; > > > The loop just printed NEXT 300 or so times. I was thinking > that $

RE: Regular Expressions http error code

2003-03-12 Thread Romeyn, Derek
hat $code would equal whatever was in the parentheses. Am I still not getting this? -Original Message- From: George P. [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 12, 2003 9:48 AM To: Romeyn, Derek Cc: '[EMAIL PROTECTED]' Subject: Re: Regular Expressions http error co

Re: Regular Expressions http error code

2003-03-12 Thread George P.
On Wed, 12 Mar 2003, Romeyn, Derek wrote: > I have a DB that records HTTP log data like this. I'm horrible at regular > expressions and could use some real help in pulling out the HTTP error code > from lines that look like this. > > 65.248.129.126 - xm1721 [11/Mar/2003:05:41:35 -0800] "POST > /