Parsing html row with a regular expression

Posted on 2006-05-21
Last Modified: 2010-04-16
Hi, I 'm trying to parse these two rows out with a regular expression... But I have not been able to come up with an expression? The only thing that is known is that Footer Note will ALWAYS be present.

          <TH something in here>Footer Note</TH></TR>
          <TD something in here could be anything> SOME Text in here could be anything</TD></TR>
Question by:dotnet22
    LVL 10

    Expert Comment

    what do u really want to extract from this content?

    Author Comment

    From the first  <TR> to the last </TD></TR>
    LVL 14

    Accepted Solution

           private void button1_Click(object sender, EventArgs e)
                 string  s;
                 s = @"<TR><TH something in here>Footer Note</TH></TR>";
                 s+= @"<TR><TD something in here could be anything>";
                 s+= @"SOME Text in here could be anything</TD></TR>";
            private void ExtractTr(string HtmlData)
                    string sPattern;
                    sPattern = @"<tr[\s\S]*?>[\s\S]*?</tr>";
                    foreach(Match oItem in Regex.Matches(HtmlData,sPattern,RegexOptions.IgnoreCase))
    LVL 14

    Expert Comment

    by:Shiju Sasidharan
    also insert namespace

    using System.Text.RegularExpressions;

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now