ITPub博客

首页 > 应用开发 > > 正则匹配 一段html

正则匹配 一段html

作者:amadan 时间:2019-08-01 10:12:00 0 删除 编辑

通过ajax获取一个html. 要匹配出 5个table中的其中一个table的全部innerHTML

<table width="936" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFB91F" align="center" style="color:Black;margin-bottom:4px;">
        tr一堆
        td一堆
</table>
  <table width="936" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFB91F" align="center" style="color:Black;margin-bottom:4px;">
        tr一堆
        td一堆
</table>
  <table width="936" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFB91F" align="center" style="color:Black;margin-bottom:4px;">
        tr一堆
        td一堆
</table>

.....

<table width="936" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFB91F" align="center" style="color:Black;margin-bottom:4px;">
        tr一堆
        td一堆
</table>
  <table width="936" border="0" cellpadding="0" cellspacing="1" bgcolor="#FFB91F" align="center" style="color:Black;margin-bottom:4px;">
        tr一堆
        td一堆
</table>

我想匹配第3个table, 怎么写正则

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/2310/viewspace-3148107/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2019-08-06

  • 博文量
    200
  • 访问量
    14417