{"id":52908,"date":"2024-12-03T08:31:55","date_gmt":"2024-12-03T00:31:55","guid":{"rendered":"https:\/\/fwq.ai\/blog\/52908\/"},"modified":"2024-12-03T08:31:55","modified_gmt":"2024-12-03T00:31:55","slug":"%e5%a6%82%e4%bd%95%e4%bd%bf%e7%94%a8%e6%ad%a3%e5%88%99%e8%a1%a8%e8%be%be%e5%bc%8f%e9%aa%8c%e8%af%81%e5%ad%97%e7%ac%a6%e4%b8%b2%e6%98%af%e5%90%a6%e4%bb%a5%e7%89%b9%e5%ae%9a%e7%bd%91%e5%9d%80%e5%bc%80-2","status":"publish","type":"post","link":"https:\/\/fwq.ai\/blog\/52908\/","title":{"rendered":"\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f"},"content":{"rendered":"<p><b><\/b>     <\/p>\n<h1>\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f<\/h1>\n<p>\u4eca\u65e5\u4e0d\u80af\u57cb\u5934\uff0c\u660e\u65e5\u4f55\u4ee5\u62ac\u5934\uff01\u6bcf\u65e5\u4e00\u53e5\u52aa\u529b\u81ea\u5df1\u7684\u8bdd\u54c8\u54c8~\u54c8\u55bd\uff0c\u4eca\u5929\u6211\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\">\u300a\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f\u300b<\/span>\uff0c\u4e3b\u8981\u5185\u5bb9\u662f\u8bb2\u89e3<span style=\"color: #FF6600;, Helvetica, Arial, sans-serif;font-size: 14px;background-color: #FFFFFF\"><\/span>\u7b49\u7b49\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u6536\u85cf\u6216\u8005\u6709\u66f4\u597d\u7684\u5efa\u8bae\u5728\u8bc4\u8bba\u63d0\u51fa\uff0c\u6211\u90fd\u4f1a\u8ba4\u771f\u770b\u7684\uff01\u5927\u5bb6\u4e00\u8d77\u8fdb\u6b65\uff0c\u4e00\u8d77\u5b66\u4e60\uff01<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.17golang.com\/uploads\/20241124\/17324392076742eca7b0f73.jpg\" class=\"aligncenter\" title=\"\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f\u63d2\u56fe\" alt=\"\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f\u63d2\u56fe\" \/><\/p>\n<p><strong>js \u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\u7684\u5b57\u7b26\u4e32<\/strong><\/p>\n<p>\u5bf9\u4e8e\u9700\u8981\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u6307\u5b9a\u7f51\u5740 https:\/\/itunes.apple.com \u5f00\u5934\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5b9e\u73b0\u3002<\/p>\n<p>\u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u7528\u4e8e\u5339\u914d\u5b57\u7b26\u4e32\u4e2d\u7279\u5b9a\u6a21\u5f0f\u7684\u8bed\u6cd5\u3002\u8981\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5 https:\/\/itunes.apple.com \u5f00\u5934\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a<\/p>\n<pre>\/^https:\/\/itunes.apple.com\/<\/pre>\n<p><strong>\u6b63\u5219\u8868\u8fbe\u5f0f\u89e3\u6790\uff1a<\/strong><\/p>\n<ul>\n<li><strong>^<\/strong>\uff1a\u8868\u793a\u5b57\u7b26\u4e32\u7684\u5f00\u59cb\u3002<\/li>\n<li><strong>https:\/\/itunes.apple.com<\/strong>\uff1a\u6307\u5b9a\u8981\u5339\u914d\u7684\u7f51\u5740\u3002<\/li>\n<li><strong>\/<\/strong>\uff1a\u8868\u793a\u5b57\u7b26\u4e32\u7684\u7ed3\u5c3e\u3002<\/li>\n<\/ul>\n<p><strong>\u4f7f\u7528\u65b9\u6cd5\uff1a<\/strong><\/p>\n<p>\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5 https:\/\/itunes.apple.com \u5f00\u5934\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a<\/p>\n<pre>const string = \"https:\/\/itunes.apple.com\/app\/id1038281767\";\nconst regex = \/^https:\/\/itunes.apple.com\/;\nconst result = regex.test(string);<\/pre>\n<p>\u5982\u679c result \u4e3a true\uff0c\u5219\u5b57\u7b26\u4e32\u4ee5 https:\/\/itunes.apple.com \u5f00\u5934\uff0c\u5426\u5219\u4e0d\u4ee5\u8be5\u7f51\u5740\u5f00\u5934\u3002<\/p>\n<p>\u6587\u4e2d\u5173\u4e8e\u7684\u77e5\u8bc6\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u4f60\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\uff01\u82e5\u662f\u53d7\u76ca\u532a\u6d45\uff0c\u90a3\u5c31\u52a8\u52a8\u9f20\u6807\u6536\u85cf\u8fd9\u7bc7\u300a\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f\u300b\u6587\u7ae0\u5427\uff0c\u4e5f\u53ef\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\u4e86\u89e3\u76f8\u5173\u6280\u672f\u6587\u7ae0\u3002<\/p>\n<dl>\n<dt><\/dt>\n<dd>\n   Docker Nginx \u8f6c\u53d1PHP\u670d\u52a1\u65f6\u51fa\u73b0502\u9519\u8bef\uff0c\u5982\u4f55\u89e3\u51b3\uff1f\n <\/dd>\n<\/dl>\n","protected":false},"excerpt":{"rendered":"<p>\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f \u4eca\u65e5\u4e0d\u80af\u57cb\u5934\uff0c\u660e\u65e5\u4f55\u4ee5\u62ac\u5934\uff01\u6bcf\u65e5\u4e00\u53e5\u52aa\u529b\u81ea\u5df1\u7684\u8bdd\u54c8\u54c8~\u54c8\u55bd\uff0c\u4eca\u5929\u6211\u5c06\u7ed9\u5927\u5bb6\u5e26\u6765\u4e00\u7bc7\u300a\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f\u300b\uff0c\u4e3b\u8981\u5185\u5bb9\u662f\u8bb2\u89e3\u7b49\u7b49\uff0c\u611f\u5174\u8da3\u7684\u670b\u53cb\u53ef\u4ee5\u6536\u85cf\u6216\u8005\u6709\u66f4\u597d\u7684\u5efa\u8bae\u5728\u8bc4\u8bba\u63d0\u51fa\uff0c\u6211\u90fd\u4f1a\u8ba4\u771f\u770b\u7684\uff01\u5927\u5bb6\u4e00\u8d77\u8fdb\u6b65\uff0c\u4e00\u8d77\u5b66\u4e60\uff01 js \u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\u7684\u5b57\u7b26\u4e32 \u5bf9\u4e8e\u9700\u8981\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u6307\u5b9a\u7f51\u5740 https:\/\/itunes.apple.com \u5f00\u5934\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5b9e\u73b0\u3002 \u6b63\u5219\u8868\u8fbe\u5f0f\u662f\u4e00\u79cd\u7528\u4e8e\u5339\u914d\u5b57\u7b26\u4e32\u4e2d\u7279\u5b9a\u6a21\u5f0f\u7684\u8bed\u6cd5\u3002\u8981\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5 https:\/\/itunes.apple.com \u5f00\u5934\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u6b63\u5219\u8868\u8fbe\u5f0f\uff1a \/^https:\/\/itunes.apple.com\/ \u6b63\u5219\u8868\u8fbe\u5f0f\u89e3\u6790\uff1a ^\uff1a\u8868\u793a\u5b57\u7b26\u4e32\u7684\u5f00\u59cb\u3002 https:\/\/itunes.apple.com\uff1a\u6307\u5b9a\u8981\u5339\u914d\u7684\u7f51\u5740\u3002 \/\uff1a\u8868\u793a\u5b57\u7b26\u4e32\u7684\u7ed3\u5c3e\u3002 \u4f7f\u7528\u65b9\u6cd5\uff1a \u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5 https:\/\/itunes.apple.com \u5f00\u5934\uff0c\u53ef\u4ee5\u4f7f\u7528\u4ee5\u4e0b\u4ee3\u7801\uff1a const string = &#8220;https:\/\/itunes.apple.com\/app\/id1038281767&#8221;; const regex = \/^https:\/\/itunes.apple.com\/; const result = regex.test(string); \u5982\u679c result \u4e3a true\uff0c\u5219\u5b57\u7b26\u4e32\u4ee5 https:\/\/itunes.apple.com \u5f00\u5934\uff0c\u5426\u5219\u4e0d\u4ee5\u8be5\u7f51\u5740\u5f00\u5934\u3002 \u6587\u4e2d\u5173\u4e8e\u7684\u77e5\u8bc6\u4ecb\u7ecd\uff0c\u5e0c\u671b\u5bf9\u4f60\u7684\u5b66\u4e60\u6709\u6240\u5e2e\u52a9\uff01\u82e5\u662f\u53d7\u76ca\u532a\u6d45\uff0c\u90a3\u5c31\u52a8\u52a8\u9f20\u6807\u6536\u85cf\u8fd9\u7bc7\u300a\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u9a8c\u8bc1\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u7279\u5b9a\u7f51\u5740\u5f00\u5934\uff1f\u300b\u6587\u7ae0\u5427\uff0c\u4e5f\u53ef\u5173\u6ce8\u7c73\u4e91\u516c\u4f17\u53f7\u4e86\u89e3\u76f8\u5173\u6280\u672f\u6587\u7ae0\u3002 Docker Nginx \u8f6c\u53d1PHP\u670d\u52a1\u65f6\u51fa\u73b0502\u9519\u8bef\uff0c\u5982\u4f55\u89e3\u51b3\uff1f<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-52908","post","type-post","status-publish","format-standard","hentry","category-16"],"_links":{"self":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/comments?post=52908"}],"version-history":[{"count":0,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/posts\/52908\/revisions"}],"wp:attachment":[{"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/media?parent=52908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/categories?post=52908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fwq.ai\/blog\/wp-json\/wp\/v2\/tags?post=52908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}