Cross reference .contains?
How can I cross reference a .contains for two textboxes? like
vb Code:
for each word in textbox1.text
if textbox2.text.contains(word) then
msgbox("There was a word found that should not be there",msgboxstyle.critical,"Invalid")
end if
next
Would I need to do a RegEx to get every word in the textobox? Or should i just use a listbox and do a for each I as item in listbox1.items?
Please bless this mess!
Re: Cross reference .contains?
You need to split 1st textbox.text by the space to get an array of words. You then loop through the array, test if the 2nd textbox.text contains the current word in the 1st array.