叶子2019 发表于 2021-3-15 09:10:44

正则匹配提取数据。(问题已解决)

本帖最后由 叶子2019 于 2021-3-18 14:35 编辑

想要提取所需数据(转债代码,转债名称等数据),网站获取数据的格式是这样的:


<tr class='even'data-focus='N' data-id=605 data-cb_code=sz123099 data-cbcode=123099 data-stock_code=sz300630 data-cb_name='普利转债' data-stock_name='普利制药'data-uid=0 data-today=2021-03-12 data-call=N data-unlist=N data-category=cb data-industry=13 data-topicType=109data-cb_price=115.61 data-premium=0.2244487167736 data-bt_yield=0.011421781312381data-val_premium=0.037140037678299data-remain_amount=8.5data-market_cap=190.7194556data-ma_20_chg=-0.0619593 data-rating=AA-> <td style='text-align:center' class='cb_num_id'>1</td><td class='bond_code_id bond_code' title='普利制药:300630,行业:医药—化学制药转股代码:123099(规则:深圳同转债代码,上海:110=>190,113=>191,132=>192,交易时请以上市公司公告“xxxx开始转股的公告”为准!)' style='display: none;'> 123099</td><td class='cb_name_id'><a target='_blank' style='color: #333;' href='index.php?m=cb&c=detail&a=detail&id=605'>普利转债</a></td><td class='bond_date_id'style='display: none;'> 2021-03-08</td><td class='bond_code_id stock_code'style='display: none;'> 300630</td><td class='stock_name_id stock_name' style='display: none;' title='股票代码:300630'> 普利制药</td><td class='bond_code_id industry' limit='5'style='display: none;'> 医药</td><td class='bond_code_id industry' limit='5'style='display: none;'> 化学制药</td><td class='cb_price2_id' title=' 剩余本息:123.5,税后118.8' style=''> 115.61</td><td class='cb_mov2_id' style='display: none;'> <spand style='color:green'>-1.36%</spand></td><td class='cb_mov2_id' style='display: none;'> <spand style='color:red'>0.87%</spand></td><td class='stock_price_id' style='display: none;'> 43.64</td><td class='cb_mov_id' style='display: none;'><spand style='color:green'>-0.80%</spand></td><td class='cb_price2_id' style='' title='税后118.8'> 123.5</td><td class='cb_strike_id' style='display: none;'>46.22</td><td class='cb_premium_id' style='color:#aaaaaa; background-color:#FFEBCD' title='距离转股期还剩5个月14天!'>22.4%</td><td class='cb_value_id'>94.42</td><td class='cb_t_id ' style='color:#aaaaaa;display: none;' title='距离转股期还剩5个月14天!'>5月14天</td><td class='cb_t_id bond_t bond_t1'>5.91年</td><td class='cb_t_id red_t'style=';'>3.92年</td><td class='stock_price_id remain_amount' title='股票市值:191亿元;转债余额/市值=4.5%' >8.50</td><td class='cb_trade_amount_id' style='display: none;'> 40</td><td class='cb_trade_amount_id' style='display: none;'> 4.1%</td><td class='cb_AT_id cb_to_share' title='更新时间:尚未发生转股' >4.5%</td><td class='cb_AT_id cb_to_share_shares' style='' >4.2%</td><td class='market_cap' >191</td><td class='cb_elasticity_id' title='每股净资产:4.48,CP/B(转股价格/每股净资产):10.32'>9.74</td><td class='cb_BT_id BT_yield' style='background-color:#FFEBCD'title='税后收益率:0.47%'>1.14%</td><td class='cb_AT_id AT_yield'title='加权收益率:1.01%' style=''>0.47%</td><td class='cb_AT_id BT_red' title='回售起始日:2025-02-09,注意需达成回售条件后才能行使回售权
税后回售收益率:-2.79%'>-2.62%</td><td class='cb_AT_id AT_red' title='回售起始日:2025-02-09,注意需达成回售条件后才能行使回售权' style=''>-2.79%</td><td class='cb_value_id npv_red' title='采用税前折现率:6.63%'>80.10</td><td class='cb_value_id npv_value' title='采用税前折现率:6.63%'> 85.08</td><td class='cb_elasticity_id elasticity' title='上涨修正弹性:-0.08'>0.62</td><td class='bond_rating_id rating' title='担保:无'>AA-</td><td class='bond_rating_id discount_rate' style='display: none;'>6.63%</td><td class='cb_wa_id' style=''title='' >136.8</td><td class='cb_elasticity_id' style='display: none;'> 1</td><td class='cb_wa_id' style=''title='' >51.7</td><td class='cb_elasticity_id'style='display: none;'> 1</td><td class='cb_value_id' style=''title='' >-6.2%</td><td class='cb_elasticity_id'   style='display: none;'> 2</td></tr><tr data-focus='N'data-id=604 data-cb_code=sz123098 data-cbcode=123098 data-stock_code=sz300723 data-cb_name='一品转债' data-stock_name='一品红'data-uid=0 data-today=2021-03-12 data-call=N data-unlist=N data-category=cb data-industry=13 data-topicType=457data-cb_price=134.9 data-premium=0.2496402266289 data-bt_yield=-0.014470215850256data-val_premium=0.10190812259034data-remain_amount=4.8data-market_cap=79.514309data-ma_20_chg=0.0414186 data-rating=AA-> <td style='text-align:center' class='cb_num_id'>2</td><td class='bond_code_id bond_code' title='一品红:300723,行业:医药—医药行业转股代码:123098(规则:深圳同转债代码,上海:110=>190,113=>191,132=>192,交易时请以上市公司公告“xxxx开始转股的公告”为准!)' style='display: none;'> 123098</td><td class='cb_name_id'><a target='_blank' style='color: #333;' href='index.php?m=cb&c=detail&a=detail&id=604'>一品转债</a></td><td class='bond_date_id'style='display: none;'> 2021-02-23</td><td class='bond_code_id stock_code'style='display: none;'> 300723</td><td class='stock_name_id stock_name' style='display: none;' title='股票代码:300723'> 一品红</td><td class='bond_code_id industry' limit='5'style='display: none;'> 医药</td><td class='bond_code_id industry' limit='5'style='display: none;'> 医药行业</td><td class='cb_price2_id' title=' 剩余本息:124,税后119.2' style=''> 134.9</td><td class='cb_mov2_id' style='display: none;'> <spand style='color:red'>0.67%</spand></td><td class='cb_mov2_id' style='display: none;'> <spand style='color:green'>-1.84%</spand></td><td class='stock_price_id' style='display: none;'> 49.42</td><td class='cb_mov_id' style='display: none;'><spand style='color:green'>-1.67%</spand></td><td class='cb_price2_id' style='' title='税后119.2'> 124</td><td class='cb_strike_id' style='display: none;'>45.78</td><td class='cb_premium_id' style='color:#aaaaaa; background-color:#FFEBCD' title='距离转股期还剩4个月24天!'>25.0%</td><td class='cb_value_id'>107.95</td><td class='cb_t_id ' style='color:#aaaaaa;display: none;' title='距离转股期还剩4个月24天!'>4月24天</td><td class='cb_t_id bond_t bond_t1'>5.88年</td><td class='cb_t_id red_t'style=';'>3.88年</td><td class='stock_price_id remain_amount' title='股票市值:80亿元;转债余额/市值=6.0%' >4.80</td><td class='cb_trade_amount_id' style='display: none;'> 226</td><td class='cb_trade_amount_id' style='display: none;'> 34.3%</td><td class='cb_AT_id cb_to_share' title='更新时间:尚未发生转股' >6.0%</td><td class='cb_AT_id cb_to_share_shares' style='' >6.5%</td><td class='market_cap' >80</td><td class='cb_elasticity_id' title='每股净资产:9.10,CP/B(转股价格/每股净资产):5.03'>5.43</td><td class='cb_BT_id BT_yield' style='background-color:#FFEBCD'title='税后收益率:-2.11%'>-1.45%</td><td class='cb_AT_id AT_yield'title='加权收益率:-1.58%' style=''>-2.11%</td><td class='cb_AT_id BT_red' title='回售起始日:2025-01-28,注意需达成回售条件后才能行使回售权
税后回售收益率:-6.46%'>-6.29%</td><td class='cb_AT_id AT_red' title='回售起始日:2025-01-28,注意需达成回售条件后才能行使回售权' style=''>-6.46%</td><td class='cb_value_id npv_red' title='采用税前折现率:6.63%'>80.33</td><td class='cb_value_id npv_value' title='采用税前折现率:6.63%'> 85.63</td><td class='cb_elasticity_id elasticity' title='上涨修正弹性:-1.20'>0.70</td><td class='bond_rating_id rating' title='担保:无'>AA-</td><td class='bond_rating_id discount_rate' style='display: none;'>6.63%</td><td class='cb_wa_id' style=''title='' >161.8</td><td class='cb_elasticity_id' style='display: none;'> 1</td><td class='cb_wa_id' style=''title='' >76.2</td><td class='cb_elasticity_id'style='display: none;'> 1</td><td class='cb_value_id' style=''title='' >4.1%</td><td class='cb_elasticity_id'   style='display: none;'> 2</td></tr><tr data-focus='N'data-id=44 data-cb_code=sh110031 data-cbcode=110031 data-stock_code=sh600271 data-cb_name='航信转债' data-stock_name='航天信息'data-uid=0 data-today=2021-03-12 data-call=N data-unlist=N data-category=cb data-industry=25 data-topicType=1543data-cb_price=106.43 data-premium=1.0898276867031 data-bt_yield=0.021417326012429data-val_premium=0.0024111364364157data-remain_amount=23.99data-market_cap=203.44293data-ma_20_chg=-0.015688 data-rating=AAA> <td style='text-align:center' class='cb_num_id'>338</td><td class='bond_code_id bond_code' title='航天信息:600271,行业:计算机及应用—软件开发转股代码:190031(规则:深圳同转债代码,上海:110=>190,113=>191,132=>192,交易时请以上市公司公告“xxxx开始转股的公告”为准!)' style='display: none;'> 110031</td><td class='cb_name_id'><a target='_blank' style='color: #333;' href='index.php?m=cb&c=detail&a=detail&id=44'>航信转债<span style='color:#3cb371' title='
2020-12-14已满足回售条件!'>!</span><span style='color:blue' title='
2015-07-09已满足下修条件!'>!</span></a></td><td class='bond_date_id'style='display: none;'> 2015-06-30</td><td class='bond_code_id stock_code'style='display: none;'> 600271</td><td class='stock_name_id stock_name' style='display: none;' title='股票代码:600271'> 航天信息</td><td class='bond_code_id industry' limit='5'style='display: none;'> 计算机及应用</td><td class='bond_code_id industry' limit='5'style='display: none;'> 软件开发</td><td class='cb_price2_id' title=' 剩余本息:107,税后105.6' style=''> 106.43</td><td class='cb_mov2_id' style='display: none;'> <spand style='color:red'>0.08%</spand></td><td class='cb_mov2_id' style='display: none;'> <spand style='color:green'>-0.08%</spand></td><td class='stock_price_id' style='display: none;'> 10.98</td><td class='cb_mov_id' style='display: none;'><spand style='color:green'>-1.08%</spand></td><td class='cb_price2_id' style='' title='税后105.6'> 107</td><td class='cb_strike_id' title='董事会1次建议下调转股价,点击查看详情' style='display: none;'><a target='_blank' style='text-decoration: underline;color: #333;' href='/index.php?m=cb&c=detail&a=revise_down_detail&id=44'> 21.56</a></td><td class='cb_premium_id' style=' background-color:#FFEBCD' title='转股期已开始'>109%</td><td class='cb_value_id'>50.93</td><td class='cb_t_id ' style='display: none;'>转股中</td><td class='cb_t_id bond_t bond_t1'>0.25年</td><td class='cb_t_id red_t' style=''>回售内</td><td class='stock_price_id remain_amount' title='股票市值:203亿元;转债余额/市值=11.8%' >24.0</td><td class='cb_trade_amount_id' style='display: none;'> 5.2</td><td class='cb_trade_amount_id' style='display: none;'> 0.2%</td><td class='cb_AT_id cb_to_share' title='更新时间:2021-03-15 01:46:19' >11.8%</td><td class='cb_AT_id cb_to_share_shares' style='' >6.0%</td><td class='market_cap' >203</td><td class='cb_elasticity_id' title='每股净资产:6.21,CP/B(转股价格/每股净资产):3.47'>1.77</td><td class='cb_BT_id BT_yield' style='background-color:#FFEBCD'title='税后收益率:-3.06%'>2.14%</td><td class='cb_AT_id AT_yield'title='加权收益率:1.10%' style=''>-3.06%</td><td class='cb_AT_id BT_red'>回售内</td><td class='cb_AT_id AT_red' style=''>回售内</td><td class='cb_value_id npv_red' title='采用税前折现率:3.17%'>100.27</td><td class='cb_value_id npv_value' title='采用税前折现率:3.17%'> 106.16</td><td class='cb_elasticity_id elasticity' title='上涨修正弹性:-0.05'>0.00</td><td class='bond_rating_id rating' title='担保:航天科工集团承诺对本公司本次发行可转换公司债券的到期兑付提供全额、不可撤销的连带责任保证担保'>AAA</td><td class='bond_rating_id discount_rate' style='display: none;'>3.17%</td><td class='cb_wa_id' style=''title='' >161.9</td><td class='cb_elasticity_id' style='display: none;'> 1</td><td class='cb_wa_id' style=''title='' >55.8</td><td class='cb_elasticity_id'style='display: none;'> 1</td><td class='cb_value_id' style=''title='' >-1.6%</td><td class='cb_elasticity_id'   style='display: none;'> 15</td></tr>




谢谢了。

afan 发表于 2021-3-17 22:54:35

本帖最后由 afan 于 2021-3-17 22:59 编辑

(?si)data-cb_code=(\w+).+?税后[\d.]+'.+?'>\h+([\d.]+)<.+?>([-\d.]+%)<.+?>([-\d.]+%)<.+?>\h+([\d.]+)<.+?>([-\d.]+%)<.+?税后[\d.]+'>\h+([\d.]+)<.+?>\h*([\d.]+)<.+?[^\x00-\xff]'>([\d.]+%)<.+?>([\d.]+)<.+?>(\d*[^\x00-\xff].*?)<.+?>([^<]*?[^\x00-\xff].*?)<.+?>([^<]*?[^\x00-\xff].*?)<.+?>([\d.]+)<.+?>\h+([\d.]+)<.+?>\h+([-\d.]+%)<.+?>([-\d.]+%)<.+?>([-\d.]+%)<.+?>([\d.]+)<.+?>([\d.]+)<.+?>([-\d.]+%)<.+?>([-\d.]+%)<.+?>([-\d.]+%|[^\x00-\xff]+)<.+?>([-\d.]+%|[^\x00-\xff]+)<.+?>([\d.]+)<.+?>\h+([\d.]+)<.+?>([\d.]+)<.+?>(\w+-*)<.+?>([-\d.]+%)<.+?>([\d.]+)<.+?>([\d.]+)<.+?>([-\d.]+%)<.+?

说实话,这么长的表达式,你出钱都不一定有人愿意帮忙写……
时间就是金钱

;

redapple2008 发表于 2021-3-15 12:16:41

写出具体格式还能好看一点,这样真不知道你要什么?

风过无痕 发表于 2021-3-15 12:41:06

本帖最后由 风过无痕 于 2021-3-15 12:42 编辑

好歹写出想要的结果是啥样的吧?这样不清不楚的,根本不知道你想要提取什么,这样大大们看到了也没人帮你解决的。

叶子2019 发表于 2021-3-15 14:03:10

这样的,加上“转债代码”列。



shqf 发表于 2021-3-16 11:55:50

一楼说“等数据”,不具体说清楚究竟有哪些数据,让人如何着手? 4楼说“这样的”,可提供的数据中有“转债价格”吗?

叶子2019 发表于 2021-3-16 13:12:34

不好意思,是我没有说清楚,就是红色底色的数据(后面的一样)。


<tr class='even'data-focus='N' data-id=605 data-cb_code=sz123099 data-cbcode=123099 data-stock_code=sz300630 data-cb_name='普利转债' data-stock_name='普利制药'data-uid=0 data-today=2021-03-12 data-call=N data-unlist=N data-category=cb data-industry=13 data-topicType=109data-cb_price=115.61 data-premium=0.2244487167736 data-bt_yield=0.011421781312381data-val_premium=0.037140037678299data-remain_amount=8.5 data-market_cap=190.7194556data-ma_20_chg=-0.0619593 data-rating=AA-> <td style='text-align:center' class='cb_num_id'>1</td><td class='bond_code_id bond_code' title='普利制药:300630,行业:医药—化学制药&#13转股代码:123099(规则:深圳同转债代码,上海:110=>190,113=>191,132=>192,交易时请以上市公司公告“xxxx开始转股的公告”为准!)' style='display: none;'> 123099</td><td class='cb_name_id'><a target='_blank' style='color: #333;' href='index.php?m=cb&c=detail&a=detail&id=605'>普利转债</a></td><td class='bond_date_id'style='display: none;'> 2021-03-08</td><td class='bond_code_id stock_code'style='display: none;'> 300630</td><td class='stock_name_id stock_name' style='display: none;' title='股票代码:300630'> 普利制药</td><td class='bond_code_id industry' limit='5'style='display: none;'> 医药</td><td class='bond_code_id industry' limit='5'style='display: none;'> 化学制药</td><td class='cb_price2_id' title=' 剩余本息:123.5,税后118.8' style=''> 115.61</td><td class='cb_mov2_id' style='display: none;'> <spand style='color:green'>-1.36%</spand></td><td class='cb_mov2_id' style='display: none;'> <spand style='color:red'>0.87%</spand></td><td class='stock_price_id' style='display: none;'> 43.64</td><td class='cb_mov_id' style='display: none;'><spand style='color:green'>-0.80%</spand></td><td class='cb_price2_id' style='' title='税后118.8'> 123.5</td><td class='cb_strike_id' style='display: none;'>46.22</td><td class='cb_premium_id' style='color:#aaaaaa; background-color:#FFEBCD' title='距离转股期还剩5个月14天!'>22.4%</td><td class='cb_value_id'>94.42</td><td class='cb_t_id ' style='color:#aaaaaa;display: none;' title='距离转股期还剩5个月14天!'>5月14天</td><td class='cb_t_id bond_t bond_t1'>5.91年</td><td class='cb_t_id red_t'style=';'>3.92年</td><td class='stock_price_id remain_amount' title='股票市值:191亿元;转债余额/市值=4.5%' >8.50</td><td class='cb_trade_amount_id' style='display: none;'> 40</td><td class='cb_trade_amount_id' style='display: none;'> 4.1%</td><td class='cb_AT_id cb_to_share' title='更新时间:尚未发生转股' >4.5%</td><td class='cb_AT_id cb_to_share_shares' style='' >4.2%</td><td class='market_cap' >191</td><td class='cb_elasticity_id' title='每股净资产:4.48,CP/B(转股价格/每股净资产):10.32'>9.74</td><td class='cb_BT_id BT_yield' style='background-color:#FFEBCD'title='税后收益率:0.47%'>1.14%</td><td class='cb_AT_id AT_yield'title='加权收益率:1.01%' style=''>0.47%</td><td class='cb_AT_id BT_red' title='回售起始日:2025-02-09,注意需达成回售条件后才能行使回售权
税后回售收益率:-2.79%'>-2.62%</td><td class='cb_AT_id AT_red' title='回售起始日:2025-02-09,注意需达成回售条件后才能行使回售权' style=''>-2.79%</td><td class='cb_value_id npv_red' title='采用税前折现率:6.63%'>80.10</td><td class='cb_value_id npv_value' title='采用税前折现率:6.63%'> 85.08</td><td class='cb_elasticity_id elasticity' title='上涨修正弹性:-0.08'>0.62</td><td class='bond_rating_id rating' title='担保:无'>AA-</td><td class='bond_rating_id discount_rate' style='display: none;'>6.63%</td><td class='cb_wa_id' style=''title='' >136.8</td><td class='cb_elasticity_id' style='display: none;'> 1</td><td class='cb_wa_id' style=''title='' >51.7</td><td class='cb_elasticity_id'style='display: none;'> 1</td><td class='cb_value_id' style=''title='' >-6.2%</td><td class='cb_elasticity_id'   style='display: none;'> 2</td></tr><tr data-focus='N'data-id=604 data-cb_code=sz123098 data-cbcode=123098 data-stock_code=sz300723 data-cb_name='一品转债' data-stock_name='一品红'data-uid=0 data-today=2021-03-12 data-call=N data-unlist=N data-category=cb data-industry=13 data-topicType=457data-cb_price=134.9 data-premium=0.2496402266289 data-bt_yield=-0.014470215850256data-val_premium=0.10190812259034data-remain_amount=4.8data-market_cap=79.514309data-ma_20_chg=0.0414186 data-rating=AA-> <td style='text-align:center' class='cb_num_id'>2</td><td class='bond_code_id bond_code' title='一品红:300723,行业:医药—医药行业&#13转股代码:123098(规则:深圳同转债代码,上海:110=>190,113=>191,132=>192,交易时请以上市公司公告“xxxx开始转股的公告”为准!)' style='display: none;'> 123098</td><td class='cb_name_id'><a target='_blank' style='color: #333;' href='index.php?m=cb&c=detail&a=detail&id=604'>一品转债</a></td><td class='bond_date_id'style='display: none;'> 2021-02-23</td><td class='bond_code_id stock_code'style='display: none;'> 300723</td><td class='stock_name_id stock_name' style='display: none;' title='股票代码:300723'> 一品红</td><td class='bond_code_id industry' limit='5'style='display: none;'> 医药</td><td class='bond_code_id industry' limit='5'style='display: none;'> 医药行业</td><td class='cb_price2_id' title=' 剩余本息:124,税后119.2' style=''> 134.9</td><td class='cb_mov2_id' style='display: none;'> <spand style='color:red'>0.67%</spand></td><td class='cb_mov2_id' style='display: none;'> <spand style='color:green'>-1.84%</spand></td><td class='stock_price_id' style='display: none;'> 49.42</td><td class='cb_mov_id' style='display: none;'><spand style='color:green'>-1.67%</spand></td><td class='cb_price2_id' style='' title='税后119.2'> 124</td><td class='cb_strike_id' style='display: none;'>45.78</td><td class='cb_premium_id' style='color:#aaaaaa; background-color:#FFEBCD' title='距离转股期还剩4个月24天!'>25.0%</td><td class='cb_value_id'>107.95</td><td class='cb_t_id ' style='color:#aaaaaa;display: none;' title='距离转股期还剩4个月24天!'>4月24天</td><td class='cb_t_id bond_t bond_t1'>5.88年</td><td class='cb_t_id red_t'style=';'>3.88年</td><td class='stock_price_id remain_amount' title='股票市值:80亿元;转债余额/市值=6.0%' >4.80</td><td class='cb_trade_amount_id' style='display: none;'> 226</td><td class='cb_trade_amount_id' style='display: none;'> 34.3%</td><td class='cb_AT_id cb_to_share' title='更新时间:尚未发生转股' >6.0%</td><td class='cb_AT_id cb_to_share_shares' style='' >6.5%</td><td class='market_cap' >80</td><td class='cb_elasticity_id' title='每股净资产:9.10,CP/B(转股价格/每股净资产):5.03'>5.43</td><td class='cb_BT_id BT_yield' style='background-color:#FFEBCD'title='税后收益率:-2.11%'>-1.45%</td><td class='cb_AT_id AT_yield'title='加权收益率:-1.58%' style=''>-2.11%</td><td class='cb_AT_id BT_red' title='回售起始日:2025-01-28,注意需达成回售条件后才能行使回售权
税后回售收益率:-6.46%'>-6.29%</td><td class='cb_AT_id AT_red' title='回售起始日:2025-01-28,注意需达成回售条件后才能行使回售权' style=''>-6.46%</td><td class='cb_value_id npv_red' title='采用税前折现率:6.63%'>80.33</td><td class='cb_value_id npv_value' title='采用税前折现率:6.63%'> 85.63</td><td class='cb_elasticity_id elasticity' title='上涨修正弹性:-1.20'>0.70</td><td class='bond_rating_id rating' title='担保:无'>AA-</td><td class='bond_rating_id discount_rate' style='display: none;'>6.63%</td><td class='cb_wa_id' style=''title='' >161.8</td><td class='cb_elasticity_id' style='display: none;'> 1</td><td class='cb_wa_id' style=''title='' >76.2</td><td class='cb_elasticity_id'style='display: none;'> 1</td><td class='cb_value_id' style=''title='' >4.1%</td><td class='cb_elasticity_id'   style='display: none;'> 2</td></tr><tr data-focus='N'data-id=44 data-cb_code=sh110031 data-cbcode=110031 data-stock_code=sh600271 data-cb_name='航信转债' data-stock_name='航天信息'data-uid=0 data-today=2021-03-12 data-call=N data-unlist=N data-category=cb data-industry=25 data-topicType=1543data-cb_price=106.43 data-premium=1.0898276867031 data-bt_yield=0.021417326012429data-val_premium=0.0024111364364157data-remain_amount=23.99data-market_cap=203.44293data-ma_20_chg=-0.015688 data-rating=AAA> <td style='text-align:center' class='cb_num_id'>338</td><td class='bond_code_id bond_code' title='航天信息:600271,行业:计算机及应用—软件开发&#13转股代码:190031(规则:深圳同转债代码,上海:110=>190,113=>191,132=>192,交易时请以上市公司公告“xxxx开始转股的公告”为准!)' style='display: none;'> 110031</td><td class='cb_name_id'><a target='_blank' style='color: #333;' href='index.php?m=cb&c=detail&a=detail&id=44'>航信转债<span style='color:#3cb371' title='
2020-12-14已满足回售条件!'>!</span><span style='color:blue' title='
2015-07-09已满足下修条件!'>!</span></a></td><td class='bond_date_id'style='display: none;'> 2015-06-30</td><td class='bond_code_id stock_code'style='display: none;'> 600271</td><td class='stock_name_id stock_name' style='display: none;' title='股票代码:600271'> 航天信息</td><td class='bond_code_id industry' limit='5'style='display: none;'> 计算机及应用</td><td class='bond_code_id industry' limit='5'style='display: none;'> 软件开发</td><td class='cb_price2_id' title=' 剩余本息:107,税后105.6' style=''> 106.43</td><td class='cb_mov2_id' style='display: none;'> <spand style='color:red'>0.08%</spand></td><td class='cb_mov2_id' style='display: none;'> <spand style='color:green'>-0.08%</spand></td><td class='stock_price_id' style='display: none;'> 10.98</td><td class='cb_mov_id' style='display: none;'><spand style='color:green'>-1.08%</spand></td><td class='cb_price2_id' style='' title='税后105.6'> 107</td><td class='cb_strike_id' title='董事会1次建议下调转股价,点击查看详情' style='display: none;'><a target='_blank' style='text-decoration: underline;color: #333;' href='/index.php?m=cb&c=detail&a=revise_down_detail&id=44'> 21.56</a></td><td class='cb_premium_id' style=' background-color:#FFEBCD' title='转股期已开始'>109%</td><td class='cb_value_id'>50.93</td><td class='cb_t_id ' style='display: none;'>转股中</td><td class='cb_t_id bond_t bond_t1'>0.25年</td><td class='cb_t_id red_t' style=''>回售内</td><td class='stock_price_id remain_amount' title='股票市值:203亿元;转债余额/市值=11.8%' >24.0</td><td class='cb_trade_amount_id' style='display: none;'> 5.2</td><td class='cb_trade_amount_id' style='display: none;'> 0.2%</td><td class='cb_AT_id cb_to_share' title='更新时间:2021-03-15 01:46:19' >11.8%</td><td class='cb_AT_id cb_to_share_shares' style='' >6.0%</td><td class='market_cap' >203</td><td class='cb_elasticity_id' title='每股净资产:6.21,CP/B(转股价格/每股净资产):3.47'>1.77</td><td class='cb_BT_id BT_yield' style='background-color:#FFEBCD'title='税后收益率:-3.06%'>2.14%</td><td class='cb_AT_id AT_yield'title='加权收益率:1.10%' style=''>-3.06%</td><td class='cb_AT_id BT_red'>回售内</td><td class='cb_AT_id AT_red' style=''>回售内</td><td class='cb_value_id npv_red' title='采用税前折现率:3.17%'>100.27</td><td class='cb_value_id npv_value' title='采用税前折现率:3.17%'> 106.16</td><td class='cb_elasticity_id elasticity' title='上涨修正弹性:-0.05'>0.00</td><td class='bond_rating_id rating' title='担保:航天科工集团承诺对本公司本次发行可转换公司债券的到期兑付提供全额、不可撤销的连带责任保证担保'>AAA</td><td class='bond_rating_id discount_rate' style='display: none;'>3.17%</td><td class='cb_wa_id' style=''title='' >161.9</td><td class='cb_elasticity_id' style='display: none;'> 1</td><td class='cb_wa_id' style=''title='' >55.8</td><td class='cb_elasticity_id'style='display: none;'> 1</td><td class='cb_value_id' style=''title='' >-1.6%</td><td class='cb_elasticity_id'   style='display: none;'> 15</td></tr>

叶子2019 发表于 2021-3-17 21:53:46

卡在数据处理这里了,请高手帮忙,谢谢。

redapple2008 发表于 2021-3-18 08:55:24

afan 发表于 2021-3-17 22:54
说实话,这么长的表达式,你出钱都不一定有人愿意帮忙写……
时间就是金钱



一看就晕,这么长的。版主也是有耐心。

afan 发表于 2021-3-18 09:14:38

redapple2008 发表于 2021-3-18 08:55
一看就晕,这么长的。版主也是有耐心。

是的,浪费了生命中的半小时…
我是看这贴几天了,LZ 还没解决~

叶子2019 发表于 2021-3-18 14:34:51

太谢谢了,谢谢。
页: [1]
查看完整版本: 正则匹配提取数据。(问题已解决)