Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4576742
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T20:14:55+00:00 2026-05-21T20:14:55+00:00

Greetings All I am trying to get the values in the 4th column from

  • 0

Greetings All

I am trying to get the values in the 4th column from the left for this url. I can get all the values but it skips the first one (e.g. 30 i think is the value on top right now )

My regex is

~<td align="center" class="row2">.*<a href="javascript:who_posted.*;">([\d,]+)</a>.*</td>~isU

NOTE: HTML PARSING IS NOT AN OPTION RIGHT NOW AS THIS IS PART OF A HUGE SYSTEM AND CANNOT
BE CHANGED

Thanking you
Imran

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T20:14:55+00:00Added an answer on May 21, 2026 at 8:14 pm

    You could just use:

    /<a href="javascript:who_posted\(\d+\);?">([\d,]+)</a>/
    

    As the javascript function can be exploited as a “regex selection point”


    If you want your regex to work you need to use non-greedy expression, i.e. change .* to .*?

    Also your first align match attribute in the HTML is surrounded in '' quotation marks, not "" in the HTML, for some weird inconsistent reason. Try this:

       |<td align=["\']center["\'] class="row2">.*?<a href="javascript:who_posted[^"]+">([\d,]+)</a>.*?</td>|is
    

    Edit:

    $a = file_get_contents('http://www.zajilnet.com/forum/index.php?showforum=31');
    
    preg_match_all('|<td align=["\']center["\'] class="row2">.*?<a href="javascript:who_posted[^"]+">([\d,]+)</a>.*?</td>|is',$a,$m);
    
    print_r($m[1]);
    

    Result:

    Array
    (
        [0] => 30
        [1] => 16
        [2] => 56
        [3] => 14
        [4] => 96
        [5] => 4
        [6] => 0
        [7] => 17
      [.... and more....]
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Greetings all, I am trying to implement a QT Plugin with CMake. But this
Greetings to all! This is my first question here on stackoverflow. I have a
Greetings all. I need to get some opinions from those outside of my work
Greetings all, I am trying to download 'gz' file using URL class .Code snippet
Greetings all, I'm not sure if this is possible but I'd like to use
Greetings all, I'm trying to localize a .NET/C# project. I'm using string resource files
Greetings all, I'm trying to implement middleware (driver) for an embedded device with generic
Greetings all, I have a question. I am trying to build a parametrized query
I am new here so first of all my greetings to you I am
Greetings, I'm trying to find a way to 'unbind' a socket from a particular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.