belaz
belaz

Reputation: 1506

How to retrieve the text between two html markup with c#?

How to retrieve the text between two html markup with c# ?

Edit : This is the only purpose of my question, "how to retrieve the string within two html markup using c#", that's all.

Upvotes: 0

Views: 469

Answers (1)

Richard Szalay
Richard Szalay

Reputation: 84744

Assuming you are referring to obtaining the text within a tag, you can either use a HTML parsing framework such as the HTML Agility Pack or you can use a regular expression. Something like:

(?<=\<title\>).+?(?=\<\/title\>)

The above will only match the text within the title tag.

Edit: You really should update your question to better explain what you are trying to achieve. The members of SO are more than happy to help, but if they can't determine what you want they will likely move on to someone else's question.

Upvotes: 3

Related Questions