This question moved from Categorized Questions and Answers by Q&AEditors
Please do not vote for this node. It will affect the wrong user.
Thank You -- Q&AEditors

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:

(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"
</code>

In reply to Logfile parsing (Moved from Q&A) by Russ

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.