10-10-13, 10:05 PM
على ما اظن هذا قصدك
كود :
On Error Resume Next
Dim Rgx As New System.Text.RegularExpressions.Regex("Good$")
If Rgx.IsMatch(TextBox1.Text) Then
TextBox1.Text &= " Good"
Else
If TextBox1.Text.Contains("Good") Then
TextBox1.Text = TextBox1.Text.Replace(Mid(TextBox1.Text, TextBox1.Text.IndexOf("Good") + 5, TextBox1.TextLength), "")
End If
End If
