t = "1234a789405450"
成都創(chuàng)新互聯(lián)10多年成都企業(yè)網(wǎng)站建設(shè)服務(wù);為您提供網(wǎng)站建設(shè),網(wǎng)站制作,網(wǎng)頁設(shè)計(jì)及高端網(wǎng)站定制服務(wù),成都企業(yè)網(wǎng)站建設(shè)及推廣,對(duì)LED顯示屏等多個(gè)方面擁有豐富的網(wǎng)站推廣經(jīng)驗(yàn)的網(wǎng)站建設(shè)公司。
tt = InStr(t, "a") - 1
If tt 1 Then
t = Mid(t, 1, tt)
MsgBox t
End If
Dim?regex=New?System.Text.RegularExpressions.Regex("\(([^\)]*)\)")
Dim?s=?regex.Replace("(111)k(222)","$1")
'定義一個(gè)find函數(shù)
Private Function find(s1 As String, s2 As String) As String
Dim i As Integer
For i = 1 To Len(s1)
If i = InStr(1, s1, s2, vbTextCompare) Then
find = Left(s1, i - 1) Right(s1, Len(s1) - Len(s2) - i + 1)
Exit Function
End If
Next i
find = s1
End Function
'將Text1.Text中的Text2.Text字符刪除
Private Sub Command1_Click()
Dim s As String
s = find(Text1.Text, Text2.Text)
Text1.Text = s
End Sub