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 6365575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:18:38+00:00 2026-05-25T00:18:38+00:00

I am very lost with this Regex. I have a HTML Table with 3

  • 0

I am very lost with this Regex. I have a HTML Table with 3 Field:Date,Name and Place. The first record of table don’t have field “Place”(i cannot change table format)… At the moment i am using pattern below:

^<tr><td.*>(.+)<\/td><td>(.+)<\/td><td><font.*>(.+)<\/font><\/td><\/tr> $\n<tr><td.*>(.+)<\/td><\/tr>

This pattern ignores the first record of table(this record don’t have field “Place”). I don’t want create 2 Pattern for same text. Can anyone help with this issue?

A sample of table:

<table  border cellpadding=1 hspace=10> 
<colgroup style='font:8pt Tahoma;color=Black' valign=top><colgroup style='font:8pt Tahoma; color=Navy'><colgroup style='font:8pt Tahoma;color=Maroon'> 
<tr> 
<td><font FACE=Tahoma color='#CC0000' size=2><b>Date</b></font></td> 
<td><font FACE=Tahoma color='#CC0000' size=2><b>Name</b></font></td> 
<td><font FACE=Tahoma color='#CC0000' size=2><b>Place</b></font></td> 
</tr> 
<tr><td rowspan=2>17/08/2011 10:28</td><td>Vivamus sed est ut lorem tempor cursus</td><td><FONT COLOR="000000">Curabitur egestas metus bibendum</font></td></tr> 
<tr><td colspan=2>Curabitur id urna elit</td></tr> 
<tr><td rowspan=2>17/08/2011 10:26</td><td>UDonec blandit nisl ut nisl elementum</td><td><FONT COLOR="000000"> hendrerit vel ante</font></td></tr> 
<tr><td colspan=2>Etiam nec mollis</td></tr> 
<tr><td rowspan=2>12/08/2011 09:46</td><td>Nulla et eros a massa</td><td><FONT COLOR="000000">Aenean in mauris eget tellus </font></td></tr> 
<tr><td colspan=2>Nulla et eros a massa tristique blandit </td></tr> 
<tr><td rowspan=2>12/08/2011 09:45</td><td>orta mi dapibus sit amet. Vestib</td><td><FONT COLOR="000000"> mollis erat consectetur.</font></td></tr> 
<tr><td colspan=2>sodales tempor</td></tr> 
<tr><td rowspan=1>11/08/2011 10:39</td><td>lorem ipsum</td><td><FONT COLOR="000000">dolor</font></td></tr>
</TABLE> 

The current solution is create 2 regexp.
The first regex catch table without first record:

^<tr><td.*>(.+)<\/td><td>(.+)<\/td><td><font.*>(.+)<\/font><\/td><\/tr> $\n<tr><td.*>(.+)<\/td><\/tr>

And the second regex capture first record:

^<tr><td.*>(.+)<\/td><td>(.+)<\/td><td><font.*>(.+)<\/font><\/td><\/tr> $
  • 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-25T00:18:38+00:00Added an answer on May 25, 2026 at 12:18 am

    More formally, XML and associated languages are not regular languages, which is why they are unsuited for parsing by regular expressions. Short of writing your own recursive descent parser, your best bet is to use an existing solution.

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

Sidebar

Related Questions

I have this very weird results when trying to fetch the AVG() field from
This is very stupid but I seem to be completely lost trying to test
This seems like a very simple question, but I'm getting lost, and need a
this is my very first post! I'm pretty desperate so I'm going above and
this question probably wont be explained very well and that's because I don't really
i'm lost in this , i have a class that has three vector objects
My problem is very simple, yet I feel lost while looking at it ...
Someday i've downloaded a very nice jquery editor but i lost it and i
JIRA is a very extensible bug/task tracking tool. As such, newcomers feel lost as
Very simply put: I have a class that consists mostly of static public members,

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.