The output form & lt;/DIV> | |||||
.
.
.
.
.
.
VB6.0 by use of how regular extract the source of TD in the middle of the words I need to extract the "red" words
Just give a regular formula, and other written, thank you teacher ~
PS:
If there are other way can also, I have a button, two TEXT, TEXT1 to source content, click on the button, TEXT2 output source
CodePudding user response:
Artificial crown ~ ~ ~ ~CodePudding user response:
& gt; ([^ & gt; & lt;] +) & lt;/TD>
CodePudding user response:
& lt; TD class=STYLE7 [^ & lt; & gt;] * & gt; ([^ & lt; & gt;] +) & lt;/TD>
CodePudding user response:
'this code by " regular testing tools> v1.1.43 "generated automatically, please direct call TestReg process
Private Sub TestReg ()
Dim strData As String
Dim reg As Object
Dim matchs the As Object, I As an Integer, j As Integer
StrData="https://bbs.csdn.net/topics/web page source"
The Set reg=CreateObject (" vbscript. RegExp ")
Reg. Global=True
Reg. The IgnoreCase=False
Reg. MultiLine=True
Reg. The Pattern="& gt; ([^ & gt; & lt;] +) & lt;/TD>"
The Set matchs=reg. The Execute (strData)
For I=0 To matchs. Count - 1
For j=0 To matchs (I) SubMatches. Count - 1
The Debug. Print "(" & amp; J + 1 & amp; ") "& amp; Matchs (I). SubMatches (j) & amp; "";
Next
If matchs (I). SubMatches. Count & gt; 0 Then the Debug. Print
Next
End Sub
(1). Type the
(1). The truck
(1). Type the
(1). FFAS
(1). No.
(1). FFAS - 54. Order - 1556
(1). The output unit
565
(1).(1). The number of
56
(1).(1). The output number
(1). G23 - FSD - 65842-01 n25 DD1
(1). Manufacturers
657
(1).(1) produce date
(1). N/A
(1) produce name
(1). Cargo trucks
CodePudding user response:
This code is automatically generated by the "regular test tools v1.1.43", please direct call TestReg process
Private Sub TestReg ()
Dim strData As String
Dim reg As Object
Dim matchs the As Object, I As an Integer, j As Integer
StrData="https://bbs.csdn.net/topics/web page code"
The Set reg=CreateObject (" vbscript. RegExp ")
Reg. Global=True
Reg. The IgnoreCase=False
Reg. MultiLine=True
Reg. The Pattern="& gt; ([^ & gt; & lt;] +) & lt;/TD> [\ s \ s] *?> ([^ & gt; & lt;] +) & lt;/TD> [\ s \ s] *?> ([^ & gt; & lt;] +) & lt;/TD> [\ s \ s] *?> ([^ & gt; & lt;] +) & lt;/TD> [\ s \ s] *?> ([^ & gt; & lt;] +) & lt;/TD> [\ s \ s] *?> ([^ & gt; & lt;] +) & lt;/TD>"
The Set matchs=reg. The Execute (strData)
For I=0 To matchs. Count - 1
nullnullnullnullnullnullnullnullnull
- Related
- Links:
- CodePudding