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

  • SEARCH
  • Home
  • 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 3955014
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T02:10:29+00:00 2026-05-20T02:10:29+00:00

I have the following piece of HTML code which I need to parse to

  • 0

I have the following piece of HTML code which I need to parse to retrieve the player name and the runs he has scored.
In this case it’s ‘Ross Taylor’ and 9.
What’s the best way to do parse this info? Don’t want to use an HTML parser.
Is REGEX the best way (I know people are dead against this! But I just want these 2 bits of info and hence don’t want to use a parser)?
I’ve been racking my brains on how I should figure out where the player name is in the html file and the consequent row which has the runs scored.
The HTML comment part below is a hard coded one. I can reach this place. Then retrieve the name between the tags. Is this a good way to do it?
Also how do I retrieve the runs part in the immediate next row?


<!-- <a href="javascript:void(0);" onClick="return showHwkTooltip(this, 'lvpyrbat1');" class="livePlayerCurrent">*Luke Woodcock</a>-->

<a href="/icc_cricket_worldcup2011/content/current/player/38920.html" target="_blank" class="livePlayerCurrent" title="view the player profile for Ross Taylor">
*Ross Taylor
</a>    <span style="margin-left:5px;" title="left-hand bat">(lhb)</span >

   </td >
   <td><b>9</b></td>
   <td>9</td>
   <td>1</td>
   <td>0</td>
   <td>100.00</td>
   <td></td>
   <td colspan="3" align="left"><span class="batStyl">striker</style></td>
   <td></td>
   <td colspan="8"></td>
  </tr>

Please let me know if you need more info.

Regards,
Sam

  • 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-20T02:10:29+00:00Added an answer on May 20, 2026 at 2:10 am

    What’s the best way to do parse this info?

    Use an HTML parser.

    Don’t want to use an HTML parser.

    I disagree.

    Is REGEX the best way

    No.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jQuery with rails and have the following piece of code $('#related').html(<%= render
I have the following piece of code which replaces template markers such as %POST_TITLE%
I have the following piece of code from a book. There is this function
I have the following piece of Mootools 1.11 code (not upgradable as this is
I have the following code. def add_resume_link(name, form) link_to_function name do |page| html =
I have the following piece of code <a onclick=$('#result').load('codes/test.html');$('#result').show(); >XHTML code</a> it loads perfectly
I have the following piece of code: <html> <head> <script src=myplugin.js /> <script> $(document).ready(function()
I have the following piece of code which play the flv file, <embed align=middle
I have following piece of code: It compiles without problems under gcc-3.4, gcc-4.3, intel
I have the following piece of code pattern: void M1(string s, string v) {

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.