how to separate string within the specified tag in c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vrsoft
    New Member
    • Apr 2009
    • 9

    #1

    how to separate string within the specified tag in c#

    i want to separate string within the specified tag.
    eg.,
    <strong>some string here</strong>


    result should be:"some string here"

    pl help me.
  • cloud255
    Recognized Expert Contributor
    • Jun 2008
    • 427

    #2
    Hi

    What have you tried?
    I suggest you read up on Regex as well as substrings/general string manipulation. Decide which approach you are more comfortable with and then attempt to create a solution.

    If you get stuck with a specific piece of code or point in your algorithm, post it and we'll help you find a solution.

    Comment

    • vrsoft
      New Member
      • Apr 2009
      • 9

      #3
      hei please help me directly.

      Originally posted by cloud255
      Hi

      What have you tried?
      I suggest you read up on Regex as well as substrings/general string manipulation. Decide which approach you are more comfortable with and then attempt to create a solution.

      If you get stuck with a specific piece of code or point in your algorithm, post it and we'll help you find a solution.
      I have to strongly take out string between some tags like <strong>, <span> and i have to store them in a separate array.please do me tat favor for me.

      Comment

      • vrsoft
        New Member
        • Apr 2009
        • 9

        #4
        How to take out string within a tag

        How to take out string within a tag in c#?
        Please help me out directly.
        eg:<span>someth ing...</span>

        o/p:
        something....

        Comment

        • cloud255
          Recognized Expert Contributor
          • Jun 2008
          • 427

          #5
          I have given you a starting point and mentioned 2 possible approaches to solving this problem. Investigate them and try one, I'll gladly help you towards a solution but I'm not going to write the solution for you.

          Try to solve the problem using string manipulation check this MSDN entry, it contains explanations on ALL the functions which you will need. Try to create a solution using these functions, if you get stuck post the code, explain where you got stuck and I will help you further.

          Start by creating an algorithm which will find the tags within a body of text, once we have that aspect we can look at extracting the text between tags.

          Comment

          Working...