473,382 Members | 1,349 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Remove content between tags

How can I remove the content in between tags?

I have a page that has several custom tags:
<!--tag:1-->
Content 1
<!--/tag:1-->
<br>
<!--tag:2-->
Content 2
<!--/tag:2-->
<br>
<!--tag:3-->
Content 3
<!--/tag:3-->

If I only wanted to see the contents of tag 2 for example, how could I
strip out 1 and 3?

Jul 22 '05 #1
1 1814
"Aaron Fleming" <aa***********@gmail.com> wrote in message
news:11**********************@g14g2000cwa.googlegr oups.com...
How can I remove the content in between tags?

I have a page that has several custom tags:
<!--tag:1-->
Content 1
<!--/tag:1-->
<br>
<!--tag:2-->
Content 2
<!--/tag:2-->
<br>
<!--tag:3-->
Content 3
<!--/tag:3-->

If I only wanted to see the contents of tag 2 for example, how could I
strip out 1 and 3?


See answer to the same question by "j1c" or did you multi-post?
Jul 22 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Nico Grubert | last post by:
Hello, I want to remove all html tags from a string "content" except <a ....>xxx</a>. My script reads like this: ### import re content = re.sub('<((|\n)*)>', '', content)
14
by: j1c | last post by:
How can I remove the content in between tags? I have a page that has several custom tags: <!--tag:1--> Content 1 <!--/tag:1--> <br> <!--tag:2--> Content 2 <!--/tag:2--> <br> <!--tag:3--> Content 3...
12
by: Oberon | last post by:
I have a large HTML document. It has hundreds of <span>s which have no attributes so these <span>s are redundant. How can I remove these tags automatically? The document also has <span>s with...
1
by: Miguel Dias Moura | last post by:
Hello, I am adding a MetaTag from my .pasx.vb code: Dim metaTag As New HtmlMeta() metaTag.Name = "Title" metaTag.Content = "My Web Site" Page.Header.Controls.Add(metaTag) Later in my code I...
1
by: dave8421 | last post by:
Hi, I'm trying to make sense of the definition for "Rendered Content" in current CR for CSS 2.1 Is rendered content what is displayed on the particular media or device? from the...
3
by: MikeB | last post by:
Hello, I have a content page that is from a Master page which has 2 content panes. How do I add my forms to the content page? Each pane needs a form but you can not have multiple form tags nor...
0
by: peter pilsl | last post by:
For feeding the content of an xml-file to a search-indexer I need to remove all tags and extract the plaintext out of a xml-file. I use the null-xls-stylesheet <?xml version="1.0"?>...
4
by: ashish1779 | last post by:
hi I am new in PHP, i have face one problem when I crawl any site and i have to save the whole HTML content in database, on that time all the HTML tags are changes into the extra space in content...
3
by: junkchiu | last post by:
want to remove "content" between two corresponding tags. What's the best way of doing it? I want to remove contents between <SEC-HEADER> and <table> tags. I have different tags, and I want to remove...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.