N
norton
Hi All,
I am defining a simple regular expressuions to capture some data from
specific content
I expected i can got 5 matches cases. However, i can only got 1 match and
the result is not as same as mine.
Can anyone tell me what's wrong with my regular exprssions pattern? Thx in
advance
Regards,
Norton
My Code
-------------------------------------------
Imports System.Text.RegularExpressions
Dim regex = New Regex( _
"<td\swidth=""30"">(?<Point>\w*)</td>.*<td>(?<Result>\w*)</td>", _
RegexOptions.Singleline _
Or RegexOptions.Compiled _
)
The source HTML code
---------------------------------------------
<table width="100%" border="0" cellspacing="5" cellpadding="2">
<tr>
<td width="30">Point1</td>
<td>A</td>
</tr>
<tr>
<td width="30">Point2</td>
<td>B</td>
</tr>
<tr>
<td width="30">Point3</td>
<td>C</td>
</tr>
<tr>
<td width="30">Point4</td>
<td>D</td>
</tr>
<tr>
<td width="30">Point5</td>
<td>E</td>
</tr>
</table>
I am defining a simple regular expressuions to capture some data from
specific content
I expected i can got 5 matches cases. However, i can only got 1 match and
the result is not as same as mine.
Can anyone tell me what's wrong with my regular exprssions pattern? Thx in
advance
Regards,
Norton
My Code
-------------------------------------------
Imports System.Text.RegularExpressions
Dim regex = New Regex( _
"<td\swidth=""30"">(?<Point>\w*)</td>.*<td>(?<Result>\w*)</td>", _
RegexOptions.Singleline _
Or RegexOptions.Compiled _
)
The source HTML code
---------------------------------------------
<table width="100%" border="0" cellspacing="5" cellpadding="2">
<tr>
<td width="30">Point1</td>
<td>A</td>
</tr>
<tr>
<td width="30">Point2</td>
<td>B</td>
</tr>
<tr>
<td width="30">Point3</td>
<td>C</td>
</tr>
<tr>
<td width="30">Point4</td>
<td>D</td>
</tr>
<tr>
<td width="30">Point5</td>
<td>E</td>
</tr>
</table>