Remove text in richtextbox between specified words/tags

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Mague
    New Member
    • May 2007
    • 137

    Remove text in richtextbox between specified words/tags

    Is it possible to get rid of text in a richtextbox with a selected two words for eg.

    <title> i want to get rid of these tags and the text within </title>

    if it is how?

    Thanks mague
  • hariharanmca
    Top Contributor
    • Dec 2006
    • 1977

    #2
    Originally posted by Mague
    Is it possible to get rid of text in a richtextbox with a selected two words for eg.

    <title> i want to get rid of these tags and the text within </title>

    if it is how?

    Thanks mague

    Mague can you explain littlebit more? and hearafter give appropriate topic.

    Comment

    • Mague
      New Member
      • May 2007
      • 137

      #3
      Well. Im trying to get a website up. This website has some of my software and friends graphics. We are a group called flume. We are all 13 so its not going to be big just for ex. Anyways i got a bit of topic. Im creating a webserver of my computer which will hook up to a domain. I want it so in vb.net i can edit sertain sections of the code. eg In the same page but different little sections. So to do this i will need to take out things like
      <title> dfgiojdfoigjdfo igj </title>
      this will need to take out the tags and the dfgiodfgdfgdjdf g stuff.

      I have vb.net and vb6 but i would perfer in vb.net seing i dont really know vb6.

      Comment

      • hariharanmca
        Top Contributor
        • Dec 2006
        • 1977

        #4
        Originally posted by Mague
        Well. Im trying to get a website up. This website has some of my software and friends graphics. We are a group called flume. We are all 13 so its not going to be big just for ex. Anyways i got a bit of topic. Im creating a webserver of my computer which will hook up to a domain. I want it so in vb.net i can edit sertain sections of the code. eg In the same page but different little sections. So to do this i will need to take out things like
        <title> dfgiojdfoigjdfo igj </title>
        this will need to take out the tags and the dfgiodfgdfgdjdf g stuff.

        I have vb.net and vb6 but i would perfer in vb.net seing i dont really know vb6.
        already there is a issue which had been cleared as enough.

        Just Click This

        Comment

        • Killer42
          Recognized Expert Expert
          • Oct 2006
          • 8429

          #5
          You should be able to do it fairly simply by using something like the Instr() function to find the strings, then setting the RTB's .SelStart and .SelLength properties to select the text in that range. Then just set .SelText (or possibly .SelRtf) to empty.

          You might also want to investigate the RTB's Span method - from the doco, it sounds relevant.

          Comment

          Working...