02-11-25, 11:13 PM
هل هذا المطلوب
يمكن استبدال الحرف W بالرمز + اذا كان الهدف فقط حذف الرمز +
كود :
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim arr As New ArrayList
Dim users = File.ReadAllText("textfile.txt")
For Each m As Match In Regex.Matches(users, "(.*)=(.*)")
arr.Add(New With {
.UserName = Regex.Replace(m.Groups(1).Value, "\W", " "),
.RegDate = m.Groups(2).Value})
Next
Me.DataGridView1.DataSource = arr
End Sub