zhouxn921031 2021-01-20 12:49 采纳率: 42.9%
浏览 50

正则式提取网页标签内容

<tr>
<th class="a-color-secondary a-size-base prodDetSectionEntry">
Amazon 売れ筋ランキング
</th>
<td>
<span>

<span> - 104位パソコン・周辺機器 (<a href='/gp/bestsellers/computers/ref=pd_zg_ts_computers'>の売れ筋ランキングを見るパソコン・周辺機器</a>)</span>
<br>

<span> - 6位<a href='/gp/bestsellers/computers/2151978051/ref=pd_zg_hrsr_computers'>マウス</a></span>
<br>

</span>
</td>
</tr>

 想要提取到里面的 “104位パソコン・周辺機器” 。所以尝试找一个特定文本开头的span标签来提取。

我自己写的正则式是:  ^売れ筋ランキング(.*?)$<a 

提取不到想要的内容,请问应该怎么写呢

  • 写回答

4条回答 默认 最新

  • 就爱瞎逛 2021-01-21 20:39
    关注

    你想提取什么?

    评论

报告相同问题?

悬赏问题

  • ¥15 我这模型写的不对吗?为什么lingo解出来的下面影子价格这一溜少一个变量
  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波