{"id":266406,"date":"2020-12-23T20:01:27","date_gmt":"2020-12-23T12:01:27","guid":{"rendered":"http:\/\/4563.org\/?p=266406"},"modified":"2020-12-23T20:01:27","modified_gmt":"2020-12-23T12:01:27","slug":"%e4%b8%80%e4%b8%aa%e5%85%b3%e4%ba%8e%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e7%9a%84%e9%97%ae%e9%a2%98%ef%bc%8c%e4%b8%a4%e4%b8%aa%e5%9b%ba%e5%ae%9a%e5%ad%97%e7%ac%a6%e4%b8%b2%e4%b9%8b%e9%97%b4","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=266406","title":{"rendered":"\u4e00\u4e2a\u5173\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u95ee\u9898\uff0c\u4e24\u4e2a\u56fa\u5b9a\u5b57\u7b26\u4e32\u4e4b\u95f4\u7684\u5b57\u7b26\u63d0\u53d6"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u4e00\u4e2a\u5173\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u95ee\u9898\uff0c\u4e24\u4e2a\u56fa\u5b9a\u5b57\u7b26\u4e32\u4e4b\u95f4\u7684\u5b57\u7b26\u63d0\u53d6               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : j0shfan <\/span>  <span><i><\/i> 3<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u8bf7\u95ee\u5927\u5bb6\uff0c\u5982\u4f55\u8868\u8fbe\u63d0\u53d6\u5728\u4e24\u4e2a\u5df2\u77e5\u5b57\u7b26\u4e4b\u95f4\u7684\u5b57\u7b26\uff08\u4e0d\u5305\u542b\u90a3\u4e24\u4e2a\u5df2\u77e5\u5b57\u7b26\uff09 \u6bd4\u65b9\u73b0\u5728\u6709\u4e00\u4e2a\u5b57\u7b26\u4e32 20:19:48.654 : Reply[2] from 172.16.178.125: bytes=256 time=5.2 ms TTL=62 jitter=0.10 ms \u6211\u60f3\u63d0\u53d6\u7684\u662f Reply[2]\u4e2d\u7684 2 \u90a3\u4e48\u73b0\u5728\u6211\u7684\u65b9\u6cd5\u662f\u5148\u5c06 [ 2 ] \u63d0\u53d6\u51fa\u6765\uff0c\u4f7f\u7528'[d]&#8217; \u518d\u5c06 2 \u4f7f\u7528&#8217;d&#8217;\u63d0\u53d6\u51fa\u6765<\/p>\n<p>\u80fd\u4e0d\u80fd\u76f4\u63a5\u5b9a\u4e49\u53d6\u51fa&#8217;Reply[&#8216;\u548c&#8217;]&#8217;\u4e4b\u95f4\u7684\u6570\u5b57 \u8c22\u8c22\u5927\u5bb6\uff0c\u6211\u53d1\u73b0\u6211\u8fd9\u53e5\u8bed\u6cd5\u7684\u4e0d\u61c2\uff0c\u7ed9\u6211\u9020\u6210\u4e86\u5f88\u591a\u9ebb\u70e6<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"4851953\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : morevin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             re.findall(&#8216;Reply[([0-9]*)]&#8217;, \u76ee\u6807\u5b57\u7b26\u4e32)[0]                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851954\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ymcz852 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             &#8216;Reply[2] from&#8217;.match(\/Reply[(d+)]\/)<br \/>\u53ef\u4ee5\u4f7f\u7528\u6355\u83b7\u62ec\u53f7\u53bb\u5206\u7ec4\u5339\u914d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851955\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jifengg <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             [([d]+)]<\/p>\n<p>\u76f4\u63a5\u53d6\u51fa\uff0c\u5c31\u7528()\u5206\u7ec4\uff0c\u7136\u540e\u76f4\u63a5\u53d6\u6355\u83b7\u5230\u7684\u5185\u5bb9\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851956\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : xdnauly <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             In [30]: import re<\/p>\n<p>In [31]: re.sub(&#8220;.*Reply[(d+)].*&#8221;, r&#8221;1&#8243;, &#8220;20:19:48.654 : Reply[2] from 172.16.178.125: bytes=256 time=5.2 ms TTL=62 jitter=0.10 ms&#8221;)<br \/>Out[31]: &#8216;2&#8217;<\/p>\n<p>###########<br \/>#\u7b54\u6848<br \/>re.sub(&#8220;.*Reply[(d+)].*&#8221;, r&#8221;1&#8243;, target_str)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"4851957\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jswh <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             1.\u7528\u62ec\u53f7\u5206\u7ec4<br \/>2.\u7528\u96f6\u5bbd\u65ad\u8a00<\/p>\n<p>\u53e6\u63a8\u8350\u6559\u7a0b https:\/\/deerchao.cn\/tutorials\/regex\/regex.htm#lookaround                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2a\u5173\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u95ee\u9898\uff0c\u4e24\u4e2a\u56fa\u5b9a&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/266406"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=266406"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/266406\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=266406"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=266406"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=266406"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}