download a text separately a text found within a textbox

Asked

Viewed 60 times

1

Picking a given text within another textbox or richtextbox does not matter when there is an incidence of detailed text, e.g.: "text": take out of double quotes when the next sentence is found and take to a separate textbox field

I wrote this code can select the text I’m looking for inside a textbox.

I put an image below to explain better what I need EXEMPLO

 Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click

        Dim i As Integer = 0
        Dim strTexto As String
        strTexto = TextBox3.Text

        RichTextBox1.Text = RichTextBox1.Text


        While i < RichTextBox1.Text.LastIndexOf(strTexto)
            RichTextBox1.Find(strTexto, i, RichTextBox1.TextLength, RichTextBoxFinds.None)
            RichTextBox1.SelectionBackColor = Color.Orange
            i = RichTextBox1.Text.IndexOf(strTexto, i) + 1

            txt_resultado.Text = i.ToString
        End While

    End Sub
  • Congratulations on the whim of the question, but I don’t quite understand what you want. What’s the doubt? What’s going wrong? Better define "when there is an incidence of detailed text e.g.: "text": take out of double quotes when the next sentence is found"

  • Maniero , I need to get the text that comes next to each item "text": inside the quotes because I just want the content that is inside the double quotes that is the content found within the IRS , when I do this I will make this project available to the whole community because several and several people need it .

  • Click on the image that the details of what I need are inside the upper textbox as example, more are not being captured I gave a control + c e control + v

  • IS guaranteed which will always come two dots after and then the text between quotation marks and which cannot have quotation marks inside it?

  • So the text is always formatted see on this site that I will send you it always comes the same way , follow the link https://www.receitaws.com.br/v1/cnpj/33000167000101

  • I think I get it, if I have time I see if I can answer.

  • I appreciate your time and your help .

  • I need to do just that in VB https://www.youtube.com/watch?v=eEP6cOrojTs

  • A friend settled for me in JSON , Marcio Fessini teacher . Thanks for the attention Maniero

Show 4 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.