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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:25:15+00:00 2026-05-31T19:25:15+00:00

Here is sample data <table class=sparql border=1> <tr> <th>abstract</th></tr> <tr> <td> Cologne is Germany&#39;s

  • 0

Here is sample data

<table class="sparql" border="1"> 
<tr> <th>abstract</th></tr> 
<tr> 
  <td>
    Cologne is Germany&#39;s fourth-largest city, and is the 
    largest city both in 
    the German Federal State of North Rhine-Westphalia and within the 
    Rhine-Ruhr Metropolitan Area, one of the major European metropolitan
    areas with more than ten million inhabitants."@en
 </td> 
 </tr> 
</table>

and I am trying to get the contents between <td> tag using Regular Expression. I tried something like

<td>.*</td>

But how to discard tags itselef?

  • 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-31T19:25:16+00:00Added an answer on May 31, 2026 at 7:25 pm

    As @MisterJack points out, you need to use subexpressions to be able to refer to the match. If you’re using REReplace(), then you can use \1 (or \2, etc.) as a backreference to the match. If you’re using REFind(), then you’ll want to use it with returnsubexpressions=true, and it will return a struct with len and pos arrays for the matching values. I would do this:

    <!--- I use "?" below because we want to be lazy rather than greedy --->
    <cfset the_match = REFind(the_content, "<td>(.*?)</td>", 1, true) />
    
    <cfdump var="#the_match#" />
    

    You should see a structure with len and pos arrays. It may have only one element in each array. In order to get the match content you could then do:

    <cfset match_content = mid(the_content, pos[i], len[i]) />
    

    Hope this helps.

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

Sidebar

Related Questions

Here is the sample data for test table I have [childId] [parentId] [present] 1
Data: Here is sample table(TableA) data ID StartTime EndTime 1 2012-03-22 06:00:00.000 2012-03-22 06:30:00.000
Here is a sample code to retrieve data from a database using the yield
Here is the sample code, which produces interesting output: > gg<-data.frame(x=c(a,b),y=as.integer(c(1000,100000))) > gg x
Here is a sample from Kernighan & Ritchie's The C Programming Language: int getline(char
I have a problem using data.table: How do I convert column classes? Here is
Here is a simple form I am using to send XML data in admin_xml.php
I am trying to reuse Apple's Speak Here sample code in my own iPhone
here the sample case.. i want to display banner randomly by percentage based on
Here is my sample code: from xml.dom.minidom import * def make_xml(): doc = Document()

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.