Hi,

I have a textbox and a richtextbox, if the value in textbox matches any value in the richtext box then I want to display text in a label.

I have some coding but its not exactly what I'm after

Code:
if Richtextbox1.text.Contains(Textbox1.text)
The problem with the above code is that it doesnt check the whole value in richtextbox1 ie if richtextbox has

Tom 22 12 52
Ant 86 73 91

and textbox has '1' the label will display when it should only display if the textbox has value of 22, 12, 52, 86, 73, or 91.

what have i done wrong? thanks