Hi, Asuming a table With this data:
How can a get 2 Capturing Groups with XXXX and YYYY?
So far I have only partial success:
Shows:
G1=XXXX :
G2=null
*********************
G1=null
G2=YYYY
*********************
G1=XXXX :
G2=null
*********************
G1=null
G2=YYYY
*********************
G1=XXXX :
G2=null
*********************
G1=null
G2=YYYY
*********************
(XXXX and YYYY are used just as an example. Real data is unique, but in pairs)
Any idea in how to make it:
G1=XXXX :
G2=YYYY
*********************
G1=XXXX :
G2=YYYY
*********************
G1=XXXX :
G2=YYYY
*********************
Thaks
B4X:
<tr data-ri="0" class="ui-widget-content ui-datatable-even" role="row">
<td role="gridcell"><span style="font-weight: bold;">XXXX:</span></td>
<td role="gridcell" style="text-align:left;">YYYY</td></tr>
<tr data-ri="1" class="ui-widget-content ui-datatable-odd" role="row">
<td role="gridcell"><span style="font-weight: bold;">XXXX:</span></td>
<td role="gridcell" style="text-align:left;">YYYY</td></tr>
<tr data-ri="2" class="ui-widget-content ui-datatable-even" role="row">
<td role="gridcell"><span style="font-weight: bold;">XXXX:</span></td>
<td role="gridcell" style="text-align:left;">YYYY</td></tr>
How can a get 2 Capturing Groups with XXXX and YYYY?
So far I have only partial success:
B4X:
Dim Exp As String = $"<span style="font-weight: bold[^>]+>([^<]+)|<td role="gridcell"[^>]+>([^<]+)"$
Dim m As Matcher
m = Regex.Matcher(Exp, Respuesta)
Do While m.Find
Log("G1=" & m.Group(1))
Log("G2=" & m.Group(2))
Log("*********************")
Loop
Shows:
G1=XXXX :
G2=null
*********************
G1=null
G2=YYYY
*********************
G1=XXXX :
G2=null
*********************
G1=null
G2=YYYY
*********************
G1=XXXX :
G2=null
*********************
G1=null
G2=YYYY
*********************
(XXXX and YYYY are used just as an example. Real data is unique, but in pairs)
Any idea in how to make it:
G1=XXXX :
G2=YYYY
*********************
G1=XXXX :
G2=YYYY
*********************
G1=XXXX :
G2=YYYY
*********************
Thaks