Russ has asked for the wisdom of the Perl Monks concerning the following question:
Hi, I need anyones help,
I need to pull information from web logs
which contains the string
"GET /company/newsletter.html?id+"
I need to use regular expressions to pull the numbers after the + sign. I have tried using /\+(\d+)/ so that it grabs the digits after the + sign but that doesn't seem to work.
Anyone know how to do this? You'll be a life saver.
Below is how the data looks in the file:
</code>(All on one line. Broken here for horizontal conservation -- Editor) 141.85.128.29 - - [25/Jul/2000:05:48:16 -0700] "GET /company/newslette +r.html?id+3541596 <\n added> HTTP/1.0" 200 2579 www.xdrive.com <\n added> "http://us.f12.mail.yahoo.com/ym/ShowLetter?MsgId=8894_591984_4628_766 +_15951_0&YY=91113&inc=50&order=down&sort=date&pos=0&box=Inbox" <\n ad +ded> "Mozilla/4.7 [en] (Win98; I)" "141.85.128.29.11162963062035354"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Logfile parsing (Moved from Q&A)
by steveAZ98 (Monk) on Jul 27, 2000 at 06:16 UTC | |
|
Re: Logfile parsing (Moved from Q&A)
by chromatic (Archbishop) on Jul 27, 2000 at 04:10 UTC | |
|
Re: Logfile parsing (Moved from Q&A)
by young perlhopper (Scribe) on Jul 27, 2000 at 04:18 UTC | |
|
Re: Logfile parsing (Moved from Q&A)
by fgcr (Novice) on Jul 28, 2000 at 05:29 UTC | |
|
Re: Logfile parsing (Moved from Q&A)
by fgcr (Novice) on Jul 28, 2000 at 05:29 UTC |