开启辅助访问 切换到宽版

精易论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

用微信号发送消息登录论坛

新人指南 邀请好友注册 - 我关注人的新帖 教你赚取精币 - 每日签到


求职/招聘- 论坛接单- 开发者大厅

论坛版规 总版规 - 建议/投诉 - 应聘版主 - 精华帖总集 积分说明 - 禁言标准 - 有奖举报

查看: 779|回复: 15
收起左侧

[已解决] 正则问题。。求助

 关闭 [复制链接]
结帖率:64% (16/25)
发表于 2022-11-7 10:50:10 | 显示全部楼层 |阅读模式   江西省上饶市
100精币
怎么取出     风景园林 [082803] <label style="color: #1E5B90;font-size:20px">高数一</label>  风景园林 [082803]  高数一还要这 <tr>
                    <td class="name">菏泽学院</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">40</td>
                    <td class="count" style="color: #888;">100</td>
                  </tr>

菏泽学院 , 40  100


<!DOCTYPE html>
<html lang="zh-cmn-Hans">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width,initial-scale=0.5,user-scalable=0,viewport-fit=cover" />
  <title>林业技术[510201]报考信息 - 专业院校cha询系统</title>
  <link rel="stylesheet" href="/public/css/weui.min.css" />
  <link rel="stylesheet" href="/public/css/common.css" />
  <link rel="stylesheet" href="/public/css/detail.css?_v=1.2" />
</head>

<body data-weui-theme="light">
  <div class="dialog-mask"></div>
  <div class="container">
    <div class="detail-content">
      <div class="detail-title">林业技术[510201]报考信息</div>
      <div class="detail-list">

        <div class="detail-item">
          <div class="detail-item-label">
            风景园林 [082803] <label style="color: #1E5B90;font-size:20px">高数一</label>
          </div>
          <div class="detail-item-link" data-id="082803-1">
            查看招生院校
          </div>
          <div class="detail-dialog" id="dialog-082803-1">
            <div class="dialog-close"></div>
            <h3 class="dialog-title">风景园林 [082803]</h3>
            <div class="dialog-content">
              <table>
                <thead>
                  <th>招生院校</th>
                  <th class="count">2022招生计划</th>
                  <th class="count">2021招生计划</th>
                </thead>
                <tbody>


                  <tr>
                    <td class="name">德州学院</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">140</td>
                    <td class="count" style="color: #888;">80</td>
                  </tr>

                  <tr>
                    <td class="name">潍坊理工学院</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">50</td>
                    <td class="count" style="color: #888;">-</td>
                  </tr>


                </tbody>
              </table>
            </div>
          </div>
        </div>

        <div class="detail-item">
          <div class="detail-item-label">
            园艺 [090102] <label style="color: #1E5B90;font-size:20px">高数二</label>
          </div>
          <div class="detail-item-link" data-id="090102-2">
            查看招生院校
          </div>
          <div class="detail-dialog" id="dialog-090102-2">
            <div class="dialog-close"></div>
            <h3 class="dialog-title">园艺 [090102]</h3>
            <div class="dialog-content">
              <table>
                <thead>
                  <th>招生院校</th>
                  <th class="count">2022招生计划</th>
                  <th class="count">2021招生计划</th>
                </thead>
                <tbody>


                  <tr>
                    <td class="name">菏泽学院</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">40</td>
                    <td class="count" style="color: #888;">100</td>
                  </tr>

                  <tr>
                    <td class="name">临沂大学</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">90</td>
                    <td class="count" style="color: #888;">80</td>
                  </tr>

                  <tr>
                    <td class="name">青岛农业大学海都学院</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">50</td>
                    <td class="count" style="color: #888;">40</td>
                  </tr>

                  <tr>
                    <td class="name">山东农业工程学院</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">150</td>
                    <td class="count" style="color: #888;">70</td>
                  </tr>

                  <tr>
                    <td class="name">潍坊科技学院</td>
                    <td class="count" style="color:#1E5B90;font-weight: bold;">100</td>
                    <td class="count" style="color: #888;">100</td>
                  </tr>


                </tbody>
              </table>
            </div>
          </div>
        </div>

      </div>
    </div>
  </div>
  <div class="copyright">
    <img src="/public/images/zhibo-logo.png" />
    <div class="fotter-text">
      <span class="f-left"></span>
      <span class="f-text">特别鸣谢</span>
      <span class="f-right"></span>
    </div>
  </div>
  <script src="/public/js/zepto.min.js"></script>
  <script>
    $(function () {
      var mask = $('.dialog-mask');
      $('.detail-item-link').on('click', function () {
        if (!this.dataset.id) return;
        var dialog = $('#dialog-' + this.dataset.id);
        dialog.show();
        mask.show();
      });
      $('.dialog-close').on('click', function () {
        var dialog = $(this).parent();
        mask.hide();
        dialog.hide();
      });
    });
  </script>
</body>

</html>

最佳答案

查看完整内容

(.*?)[\s\S]*?(\d+)[\s\S]*?(\d+)

评分

参与人数 1精币 +1 收起 理由
afu45 + 1 满足要求了 不选?????

查看全部评分


回答提醒:如果本帖被关闭无法回复,您有更好的答案帮助楼主解决,请发表至 源码区 可获得加分喔。
友情提醒:本版被采纳的主题可在 申请荣誉值 页面申请荣誉值,获得 1点 荣誉值,荣誉值可兑换荣誉会员、终身vip用户组。
快捷通道:申请荣誉值无答案申请取消悬赏投诉有答案未采纳为最佳

结帖率:100% (47/47)

签到天数: 6 天

发表于 2022-11-7 10:50:11 | 显示全部楼层   江西省南昌市
<td class="name">(.*?)</td>[\s\S]*?<td class="count"[\s\S]*?>(\d+)</td>[\s\S]*?<td class="[\s\S]*?">(\d+)</td>

评分

参与人数 1荣誉 +1 收起 理由
笨潴 + 1 热心帮助他人,荣誉+1,希望继续努力(*^__^*) 嘻嘻!

查看全部评分

回复

使用道具 举报

结帖率:100% (1/1)

签到天数: 6 天

发表于 2022-11-7 10:52:52 | 显示全部楼层   河南省郑州市
"name">(.*?)</td>[^>]+>(.*?)</td>[^>]+>(.*?)</td>
回复

使用道具 举报

结帖率:64% (16/25)

签到天数: 1 天

 楼主| 发表于 2022-11-7 10:55:42 | 显示全部楼层   江西省上饶市
明天自然醒 发表于 2022-11-7 10:52
(.*?)[\s\S]*?(\d+)[\s\S]*?(\d+)

这个匹配出来,只能匹配出一行内容,能把这些内容都匹配出来么

点评

设置多行匹配   江西省南昌市  发表于 2022-11-7 10:58
回复

使用道具 举报

结帖率:64% (16/25)

签到天数: 1 天

 楼主| 发表于 2022-11-7 10:58:07 | 显示全部楼层   江西省上饶市
afu45 发表于 2022-11-7 10:52
"name">(.*?)[^>]+>(.*?)[^>]+>(.*?)

这个匹配出来,只能匹配出一行内容,能把这些内容都匹配出来么
回复

使用道具 举报

结帖率:100% (1/1)

签到天数: 6 天

发表于 2022-11-7 10:59:05 | 显示全部楼层   河南省郑州市
触手梵高 发表于 2022-11-7 10:58
这个匹配出来,只能匹配出一行内容,能把这些内容都匹配出来么

多行模式 挂钩
回复

使用道具 举报

结帖率:64% (16/25)

签到天数: 1 天

 楼主| 发表于 2022-11-7 10:59:42 | 显示全部楼层   江西省上饶市
触手梵高 发表于 2022-11-7 10:55
这个匹配出来,只能匹配出一行内容,能把这些内容都匹配出来么

勾选了,还是一行
回复

使用道具 举报

结帖率:100% (1/1)

签到天数: 6 天

发表于 2022-11-7 11:00:29 | 显示全部楼层   河南省郑州市
002.png
回复

使用道具 举报

结帖率:64% (16/25)

签到天数: 1 天

 楼主| 发表于 2022-11-7 11:02:47 | 显示全部楼层   江西省上饶市

风景园林 [082803]  高数一  那这两个咋没有呀

点评

那个格式跟这个不一样   河南省郑州市  发表于 2022-11-7 11:07
回复

使用道具 举报

结帖率:64% (16/25)

签到天数: 1 天

 楼主| 发表于 2022-11-7 11:09:02 | 显示全部楼层   江西省上饶市
明天自然醒 发表于 2022-11-7 10:52
(.*?)[\s\S]*?(\d+)[\s\S]*?(\d+)

大佬,前面的那个怎么一起取出来啊
风景园林 [082803] <label style="color: #1E5B90;font-size:20px">高数一</label>  
风景园林 [082803]  高数一
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则 致发广告者

发布主题 收藏帖子 返回列表

sitemap| 易语言源码| 易语言教程| 易语言论坛| 易语言模块| 手机版| 广告投放| 精易论坛
拒绝任何人以任何形式在本论坛发表与中华人民共和国法律相抵触的言论,本站内容均为会员发表,并不代表精易立场!
论坛帖子内容仅用于技术交流学习和研究的目的,严禁用于非法目的,否则造成一切后果自负!如帖子内容侵害到你的权益,请联系我们!
防范网络诈骗,远离网络犯罪 违法和不良信息举报电话0663-3422125,QQ: 793400750,邮箱:wp@125.la
Powered by Discuz! X3.4 揭阳市揭东区精易科技有限公司 ( 粤ICP备12094385号-1) 粤公网安备 44522102000125 增值电信业务经营许可证 粤B2-20192173

快速回复 返回顶部 返回列表