{"id":340,"date":"2015-04-30T16:38:26","date_gmt":"2015-04-30T08:38:26","guid":{"rendered":"http:\/\/heartofocean.cn\/?p=340"},"modified":"2015-04-30T16:38:26","modified_gmt":"2015-04-30T08:38:26","slug":"%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f-%e5%ad%a6%e4%b9%a0%e7%ac%94%e8%ae%b0","status":"publish","type":"post","link":"https:\/\/li-yang.cn\/?p=340","title":{"rendered":"\u6b63\u5219\u8868\u8fbe\u5f0f \u5b66\u4e60\u7b14\u8bb0"},"content":{"rendered":"<p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u5bf9\u5b57\u7b26\u4e32\u64cd\u4f5c\u7684\u4e00\u79cd\u903b\u8f91\u516c\u5f0f\uff0c\u5c31\u662f\u7528\u4e8b\u5148\u5b9a\u4e49\u597d\u7684\u4e00\u4e9b\u7279\u5b9a\u5b57\u7b26\u3001\u53ca\u8fd9\u4e9b\u7279\u5b9a\u5b57\u7b26\u7684\u7ec4\u5408\uff0c\u7ec4\u6210\u4e00\u4e2a\u201c\u89c4\u5219\u5b57\u7b26\u4e32\u201d\uff0c\u8fd9\u4e2a\u201c\u89c4\u5219\u5b57\u7b26\u4e32\u201d\u7528\u6765\u8868\u8fbe\u5bf9\u5b57\u7b26\u4e32\u7684\u4e00\u79cd\u8fc7\u6ee4\u903b\u8f91\u3002\u6458\u81ea<a href=\"http:\/\/baike.baidu.com\/link?url=hQkpPPXsQc4-CS-giuxyz39Bomj7kpgTQtSy-o2G0jS3ZPlQW-VSLSVorMgYMRzKVAI6goqDfKYBTtN386Jy3a\" target=\"_blank\" rel=\"noopener noreferrer\">\u767e\u5ea6\u767e\u79d1<\/a>\u3002<!--more--><br \/>\n\u5e38\u7528\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a<br \/>\n<span style=\"color:#ff0000;\"><strong> .<\/strong><\/span> \u5339\u914d\u4efb\u610f\u5b57\u7b26\uff08.\u8f6c\u4e49\uff09<br \/>\n<span style=\"color:#ff0000;\"><strong>[a-z]<\/strong><\/span> \u8868\u793a\u5b57\u7b26\u96c6,a-z\u4e2d\u7684\u4efb\u610f\u4e00\u4e2a\u5b57\u6bcd,\u5982[0-9] [A-Z] [a-zA-Z0-9]\u7b49<br \/>\n<span style=\"color:#ff0000;\"><strong>[^a-z]<\/strong><\/span>\u9664\u4e86\u5c0f\u5199\u5b57\u6bcd\u5916\u7684\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26<br \/>\n<span style=\"color:#ff0000;\"><strong> |<\/strong><\/span>\u7ba1\u9053\u7b26\u8868\u793a\u6216\uff0c\u5982p(ython|hp)<br \/>\n<span style=\"color:#ff0000;\"><strong> w<\/strong><\/span> \u8868\u793a\u5b57\u6bcd\u3001\u6570\u5b57\u6216\u4e0b\u5212\u7ebf<br \/>\n<span style=\"color:#ff0000;\"><strong>d <\/strong><span style=\"color:#000000;\">\u8868\u793a\u4efb\u610f\u6570\u5b57<\/span><\/span><br \/>\n<span style=\"color:#ff0000;\"><strong> ( \u00a0 )?<\/strong><\/span> \u8868\u793a\u62ec\u53f7\u4e2d\u7684\u5185\u5bb9\u53ef\u80fd\u4f46\u4e0d\u4e00\u5b9a\u51fa\u73b0\u7684\uff0c\u5982(http:\/\/)?heartofocean..cn\u80fd\u5339\u914dhttp:\/\/heartofocean.cn \u548cheartofocean.cn<br \/>\n<span style=\"color:#ff0000;\"><strong>( \u00a0 )*\u00a0<\/strong><\/span>\u5141\u8bb8\u62ec\u53f7\u4e2d\u7684\u5185\u5bb9\u51fa\u73b0N\u6b21\uff0cN\u22650<br \/>\n<span style=\"color:#ff0000;\"><strong>( \u00a0 )+<\/strong><\/span>\u5141\u8bb8\u62ec\u53f7\u4e2d\u7684\u5185\u5bb9\u51fa\u73b0N\u6b21\uff0cN\u22651<br \/>\n<span style=\"color:#ff0000;\"><strong>( \u00a0 ){x,y}\u00a0<\/strong><\/span>\u5141\u8bb8\u62ec\u53f7\u4e2d\u7684\u5185\u5bb9\u51fa\u73b0N\u6b21\uff0cx\u2264N\u2264y<br \/>\n<span style=\"color:#ff0000;\"><strong>(?=exp)<\/strong><\/span> \u5339\u914dexp\u524d\u9762\u7684\u4f4d\u7f6e<br \/>\n<strong><span style=\"color:#ff0000;\">(?&lt;=exp)<\/span> <\/strong>\u5339\u914dexp\u540e\u9762\u7684\u4f4d\u7f6e<br \/>\n<strong><span style=\"color:#ff0000;\">(?!exp)<\/span> <\/strong>\u5339\u914d\u540e\u9762\u8ddf\u7684\u4e0d\u662fexp\u7684\u4f4d\u7f6e<br \/>\n<strong><span style=\"color:#ff0000;\">(?&lt;!exp)<\/span><\/strong> \u5339\u914d\u524d\u9762\u4e0d\u662fexp\u7684\u4f4d\u7f6e<br \/>\n<strong><span style=\"color:#ff0000;\">(?#comment)<\/span>\u00a0<\/strong>\u6ce8\u91ca<br \/>\n<span style=\"color:#ff0000;\"><strong>(exp)<\/strong><\/span> \u5339\u914dexp,\u5e76\u6355\u83b7\u6587\u672c\u5230\u81ea\u52a8\u547d\u540d\u7684\u7ec4\u91cc<br \/>\n<span style=\"color:#ff0000;\"><strong>(?&lt;name&gt;exp)<\/strong> <\/span>\u5339\u914dexp,\u5e76\u6355\u83b7\u6587\u672c\u5230\u540d\u79f0\u4e3aname\u7684\u7ec4\u91cc\uff0c\u4e5f\u53ef\u4ee5\u5199\u6210(?&#8217;name&#8217;exp)<br \/>\n<!--more--><br \/>\nRegular Expression HOWTO<\/p>\n<div class=\"document\">\n<div class=\"documentwrapper\">\n<div class=\"body\">\n<div id=\"regular-expression-howto\" class=\"section\">\n<div id=\"simple-patterns\" class=\"section\">\n<div id=\"matching-characters\" class=\"section\">\n<dl class=\"docutils\">\n<dt><tt class=\"docutils literal\"><span class=\"pre\">d<\/span><\/tt><\/dt>\n<dd>Matches any decimal digit; this is equivalent to the class <tt class=\"docutils literal\"><span class=\"pre\">[0-9]<\/span><\/tt>.<\/dd>\n<dt><tt class=\"docutils literal\"><span class=\"pre\">D<\/span><\/tt><\/dt>\n<dd>Matches any non-digit character; this is equivalent to the class <tt class=\"docutils literal\"><span class=\"pre\">[^0-9]<\/span><\/tt>.<\/dd>\n<dt><tt class=\"docutils literal\"><span class=\"pre\">s<\/span><\/tt><\/dt>\n<dd>Matches any whitespace character; this is equivalent to the class <tt class=\"docutils literal\"><span class=\"pre\">[<\/span> <span class=\"pre\">tnrfv]<\/span><\/tt>.<\/dd>\n<dt><tt class=\"docutils literal\"><span class=\"pre\">S<\/span><\/tt><\/dt>\n<dd>Matches any non-whitespace character; this is equivalent to the class <tt class=\"docutils literal\"><span class=\"pre\">[^<\/span> <span class=\"pre\">tnrfv]<\/span><\/tt>.<\/dd>\n<dt><tt class=\"docutils literal\"><span class=\"pre\">w<\/span><\/tt><\/dt>\n<dd>Matches any alphanumeric character; this is equivalent to the class <tt class=\"docutils literal\"><span class=\"pre\">[a-zA-Z0-9_]<\/span><\/tt>.<\/dd>\n<dt><tt class=\"docutils literal\"><span class=\"pre\">W<\/span><\/tt><\/dt>\n<dd>Matches any non-alphanumeric character; this is equivalent to the class <tt class=\"docutils literal\"><span class=\"pre\">[^a-zA-Z0-9_]<\/span><\/tt>.<\/dd>\n<\/dl>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u5bf9\u5b57\u7b26\u4e32\u64cd\u4f5c\u7684\u4e00\u79cd\u903b\u8f91\u516c\u5f0f\uff0c\u5c31\u662f\u7528\u4e8b\u5148 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-340","post","type-post","status-publish","format-standard","hentry","category-4"],"_links":{"self":[{"href":"https:\/\/li-yang.cn\/index.php?rest_route=\/wp\/v2\/posts\/340","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/li-yang.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/li-yang.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/li-yang.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/li-yang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=340"}],"version-history":[{"count":0,"href":"https:\/\/li-yang.cn\/index.php?rest_route=\/wp\/v2\/posts\/340\/revisions"}],"wp:attachment":[{"href":"https:\/\/li-yang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=340"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/li-yang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=340"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/li-yang.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=340"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}