remove string or number in between

  • Thread starter Thread starter mipakteh
  • Start date Start date
M

mipakteh

Guest
Hi All,

I want remove certai string or number from every line.Example in Textbox1 I have

Max : 12(7),Expected result in textbox2 show 7.Some can show me.

Public Class Form1
Private A_ As New List(Of String)
Private B_ As New List(Of String)

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

For j As Integer = 0 To 9
Dim value As Integer = CInt(Int((20 * Rnd()) + 1))
A_.Add("Max :" & value & "(" & j & ")")

Next

For I As Integer = 0 To A_.Count - 1
TextBox1.AppendText(A_(I) & vbCrLf)
B_.Add(A_(I))
Next

End Sub

Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
For I As Integer = 0 To B_.Count - 1
Dim List As String = B_(I)
List = List.Replace("Max :", "")

For j As Integer = 0 To List.Count - 1
Me.TextBox2.AppendText(List(j) & vbCrLf)
Next
Next
End Sub
End Class



Thank.

Continue reading...
 

Similar threads

M
Replies
0
Views
129
mipakteh
M
M
Replies
0
Views
128
mipakteh
M
M
Replies
0
Views
150
mipakteh
M
Back
Top