By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,984 Members | 2,686 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,984 IT Pros & Developers. It's quick & easy.

how to find some specific words from a paragraphs and print them into a label

P: 1
i want to find some specific words from a paragraph and print them into a label as suppose i have a paragraph:"madam I am Adam" and now i want to search "madam and Adam" from this parapgraph my code is as under
Expand|Select|Wrap|Line Numbers
  1. Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
  2.         Dim A(1) As Char
  3.         A(0) = " "
  4.         A(1) = ","
  5.         Dim B As String = RichTextBox1.Text
  6.         Dim x As String() = Nothing
  7.         Dim F As Array = {"SMUGGLING", "CROSSING", "INFILTRATION"}
  8.         x = B.Split(A)
  9.  
  10.         For Each F In x
  11.             Label1.Text += F.Contains(x) & ControlChars.NewLine
  12.         Next
  13.  
  14.     End Sub
my parapgraph in Richtextbox1 and i want to search words given in Dim F As Array{} my paragraph contains all theses words
please help me for this
Oct 24 '15 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.