I need to match
Showing Results <b>1 thru 4</b> of 4
Which is taken from $lycos_content ($content is the source code dump of the page as taken from LWP::UserAgent).

The numbers will always be different. It could be 1 thru 7 of 7. But the results, if large, may have some number separators I have to watch out for, too.

From my count, there are 7 tabs after the URL and one space after that before the "1 of" begins. I need to match the total number in $1.

This is my attempt but sadly it fails

$lycos_content =~ |Showing Results <b>\d thru \d</b> of\s*\t* (\d[\d,] +*)|s; my $lycos_results = $1; if (!defined $lycos_results) { $lycos_results=0; }
If you want to see first hand what the results look like, try going to http://search.lycos.com/default.asp?loc=searchbox&query=linkdomain%3Awww.test.comv .

Thank you.


In reply to regex to match Lycos results by coldfingertips

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.