关于截取字符串

来源:百度知道 编辑:UC知道 时间:2024/05/06 12:28:50
Private Sub Command1_Click()
Dim flml, wjj
wjj = List1.List(1)
Open (App.Path & "\flml.ini") For Binary As #1
s = Input(LOF(1), 1)
Close #1
Dim fl
Set fl = CreateObject("VBScript.RegExp")
fl.IgnoreCase = True
fl.Global = True
fl.MultiLine = True
fl.Pattern = "(.*?)=wjj"
For Each flml In fl.Execute(s)
Select Case flml.SubMatches(0)
Case "wjj"
Text2.Text = flml.SubMatches(1)
Next
End Sub

帮我看看这段那里有错。。。。
运行后。。text2.text 得不到(.*?)的值
把wjj设为常量就能得到(.*?)
是不是我把变量wjj语法写错了。高手教教下``谢谢啦``

flml.ini文件里的内容为
数值=123456789
而list1.list(1)为123456789

Private Sub Command1_Click()
Dim flml, wjj
wjj = List1.List(1)
Open (App.Path & "\flml.ini") For Binary As #1
s = Input(LOF(1), 1)
Close #1
Dim fl
Set fl = CreateObject("VBScript.RegExp")
fl.IgnoreCase = True
fl.Global = True
fl.MultiLine = True
fl.Pattern = "^(.*?)=" & wjj & "$"
For Each flml In fl.Execute(s)
Text2.Text = flml.SubMatches(0)
Next
End Sub

这么那的问题你给5分,谁回浪费时间??!!!

什麽东西啊?