我给你个例子吧!
首先在窗体里放上2个textbox和一个command。
放入下面的代码:
Private Sub Command1_Click()
Dim s, a As String
Dim i As Integer
For i = 1 To 15
a = Mid(Text1.Text, i, 1)
If a <> Chr(32) and a<>"/" Then
s = s + a
End If
Next i
Text2.Text = s
End Sub
text1里的就好比你要判定的字符
text2里的是去掉了不符合规定字符后的字符串
有其它的判定条件自己加到if语句里就可以啦!
明白了吗?