hey can some one tell me how to apply regex to items in listbox? I have been having problems, converting them to string. and listbox1.item.tostring() doesnt help... anyone have a tutorial of i can parse listbox items directly or indirectly (importhing them a in a textbox or something)? thanks
Hi Buddy, Would you not want to apply the regex before the string is in the listbox? or even once you select a listbox item? cheers Graham
This is easy - if you want to eg. put items from Listbox to Textbox Code: For Each item As String In Listbox1.Items TextBox1.Text = Textbox1.Text & item & Environment.NewLine Next And you can do regex too - just create another variable "item2" and do regex on "item" from the For Each loop and attribute it to the "item2" and then replace all the items in Listbox with the Regex-ed ones. Easy peasy.