Неужели так сложно конкретнее описывать проблему?
moko 30.12.2023 05:36
У меня код ниже печатает вот такой текст:
1. [
{"prematch":"","match":"","postmatch":"","1":"odd","2":"\n<td>\n<div class=\"dropdown\">\n<a class=\"dropdown-toggle btn btn-primary\" data-toggle=\"dropdown\">İşlemler<\/a>\n<ul class=\"dropdown-menu dropdown-menu-left\">\n<li>A<\/li>\n<li>B<\/li>\n<li>C<\/li>\n<\/ul>\n<\/div>\n<\/td>\n<td><span style=\"font-weight:bold;\">BĞZ<\/span> 28.12.23 09:52<\/td>\n\n<td style=\"font-weight:bold;\">NAME4<\/td>\n<td>68,95<\/td>\n<td>TNK<\/td>\n<td style=\"width:125px;\">\n<span>HR<\/span> <\/td>\n<td style=\"width:125px;\">\n<span>HE<\/span> <\/td>\n\n<td>28.12.23 00:14<\/td>\n<td>27.12.23 17:21<\/td>\n"}
]
2. [
{"prematch":"","match":"","postmatch":"","1":"odd","2":"\n<td>\n<div class=\"dropdown\">\n<a class=\"dropdown-toggle btn btn-primary\" data-toggle=\"dropdown\">İşlemler<\/a>\n<ul class=\"dropdown-menu dropdown-menu-left\">\n<li>A<\/li>\n<li>B<\/li>\n<li>C<\/li>\n<\/ul>\n<\/div>\n<\/td>\n<td><span style=\"font-weight:bold;\">BĞZ<\/span> 28.12.23 09:52<\/td>\n\n<td style=\"font-weight:bold;\">NAME4<\/td>\n<td>68,95<\/td>\n<td>TNK<\/td>\n<td style=\"width:125px;\">\n<span>HR<\/span> <\/td>\n<td style=\"width:125px;\">\n<span>HE<\/span> <\/td>\n\n<td>28.12.23 00:14<\/td>\n<td>27.12.23 17:21<\/td>\n"}
]
Какой результат ожидался?
@main[]
$lText[^data[]]
1. ^json:string[^lText.match[<tr role="row" class="(even|odd)">([\s\S]*?)<\/tr>][g]]
2. ^json:string[^lText.match[<tr role="row" class="(even|odd)">(.*?)<\/tr>][gs]]
@data[]
<tr role="row" class="odd">
<td>
<div class="dropdown">
<a class="dropdown-toggle btn btn-primary" data-toggle="dropdown">İşlemler</a>
<ul class="dropdown-menu dropdown-menu-left">
<li>A</li>
<li>B</li>
<li>C</li>
</ul>
</div>
</td>
<td><span style="font-weight:bold;">BĞZ</span> 28.12.23 09:52</td>
<td style="font-weight:bold;">NAME4</td>
<td>68,95</td>
<td>TNK</td>
<td style="width:125px;">
<span>HR</span> </td>
<td style="width:125px;">
<span>HE</span> </td>
<td>28.12.23 00:14</td>
<td>27.12.23 17:21</td>
</tr><tr role="row" class="even">
<td>
- match и опция s, AK666 30.12.2023 02:34
- Неужели так сложно конкретнее описывать проблему?, moko [M] 30.12.2023 05:36