- data = ReadTextFile("match_stop.txt")
-
- set ms = RegExMatch(data, "class=""smallphoto"" id=""(.*?)"".*?src=""(.*?)""[\s\S]*?author=""(.*?)""[\s\S]*?photoCName"">[\s\S]*?"">(.*?)<[\s\S]*?photoLName"">[\s\S]*?href=""(.*?)""[\s\S]*?class=""LatinName"">(.*?)<")
- MsgBox ms.count
-
- ' 去掉末尾的【""LatinName"">(.*?)<】则正常
- ' set ms = RegExMatch(data, "class=""smallphoto"" id=""(.*?)"".*?src=""(.*?)""[\s\S]*?author=""(.*?)""[\s\S]*?photoCName"">[\s\S]*?"">(.*?)<[\s\S]*?photoLName"">[\s\S]*?href=""(.*?)""[\s\S]*?class=")
-
- Function RegExMatch(ByRef inputstr, Pattern)
- Set re = New RegExp
- re.Pattern = Pattern
- re.IgnoreCase = True
- re.Global = True
- MsgBox "呵呵呵,脚本要停止运行了..下面的 MsgBox 你看不见了."
-
- Set RegExMatch = re.Execute( inputstr )
- MsgBox "你看不见我,你看不见我"
- End Function
-
- Function ReadTextFile(fPath)
- Set filesys = CreateObject("Scripting.FileSystemObject")
- Set filetxt = filesys.OpenTextFile(fPath, 1)
- ReadTextFile = filetxt.ReadAll
- End Function
复制代码
|