{"id":221944,"date":"2024-05-11T18:48:36","date_gmt":"2024-05-11T10:48:36","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/221944.html"},"modified":"2024-05-11T18:48:43","modified_gmt":"2024-05-11T10:48:43","slug":"vscodeword-%e5%a6%82%e4%bd%95%e6%9b%bf%e6%8d%a2%e4%b8%a4%e8%be%b9%e5%86%85%e5%ae%b9","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/221944.html","title":{"rendered":"vscode(word) \u5982\u4f55\u66ff\u6362\u4e24\u8fb9\u5185\u5bb9"},"content":{"rendered":"<p style=\"text-align:center\"><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25141828\/c4f6e451-6e44-496b-b409-96c7719e9179.webp\" alt=\"vscode(word) \u5982\u4f55\u66ff\u6362\u4e24\u8fb9\u5185\u5bb9\" \/><\/p>\n<p><p><strong>VSCode\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u7684\u67e5\u627e\u548c\u66ff\u6362\u529f\u80fd\u662f\u975e\u5e38\u5f3a\u5927\u7684\u3001\u591a\u6837\u5316\u7684\u3002\u82e5\u60f3\u66ff\u6362\u4e24\u8fb9\u5185\u5bb9\uff0c\u5373\u5728\u7ed9\u5b9a\u7684\u5b57\u7b26\u4e32\u524d\u540e\u6dfb\u52a0\u6216\u66f4\u6539\u5185\u5bb9\uff0c\u53ef\u4ee5\u901a\u8fc7\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5b9e\u73b0\uff0c\u540c\u65f6\u5229\u7528\u6355\u83b7\u7ec4\u529f\u80fd\u6765\u5b9a\u4f4d\u539f\u59cb\u6587\u672c\u3002\u5177\u4f53\u505a\u6cd5\u662f\uff1a\u7528\u62ec\u53f7<code>()<\/code>\u6807\u8bb0\u51fa\u9700\u8981\u4fdd\u7559\u7684\u6587\u672c\uff08\u88ab\u79f0\u4e3a\u6355\u83b7\u7ec4\uff09\uff0c\u7136\u540e\u5728\u66ff\u6362\u6846\u4e2d\u4f7f\u7528<code>$1<\/code>\u3001<code>$2<\/code>\u7b49\u6765\u4ee3\u8868\u7b2c\u4e00\u4e2a\u3001\u7b2c\u4e8c\u4e2a\u6355\u83b7\u7ec4\uff0c\u4e4b\u540e\u518d\u6dfb\u52a0\u4f60\u60f3\u5728\u524d\u540e\u52a0\u4e0a\u7684\u6587\u672c\u5373\u53ef\u3002<\/strong> \u63a5\u4e0b\u6765\uff0c\u8ba9\u6211\u4eec\u66f4\u8be6\u7ec6\u5730\u4e86\u89e3\u5982\u4f55\u4f7f\u7528VSCode\u8fdb\u884c\u8fd9\u7c7b\u66ff\u6362\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<p><h3>\u4e00\u3001\u542f\u52a8\u67e5\u627e\u548c\u66ff\u6362\u529f\u80fd<\/h3>\n<\/p>\n<p><p>\u5728VSCode\u4e2d\uff0c\u53ef\u4ee5\u901a\u8fc7\u6309\u4e0b<code>Ctrl + F<\/code>\u6765\u542f\u52a8\u67e5\u627e\u529f\u80fd\uff0c\u6309\u4e0b<code>Ctrl + H<\/code>\u6765\u542f\u52a8\u66ff\u6362\u529f\u80fd\u3002\u5728\u8fd9\u4e9b\u9762\u677f\u4e2d\uff0c\u4f60\u53ef\u4ee5\u770b\u5230\u4e00\u4e2a\u67e5\u627e\u6846\u548c\u4e00\u4e2a\u66ff\u6362\u6846\uff0c\u5de6\u4fa7\u6709\u4e00\u4e2a\u542f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u6309\u94ae\uff08\u8fd9\u4e2a\u6309\u94ae\u7684\u56fe\u6807\u50cf\u4e00\u4e2a<code>.*<\/code>\uff09\u3002<\/p>\n<\/p>\n<p><h3>\u4e8c\u3001\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u67e5\u627e<\/h3>\n<\/p>\n<p><p>\u5f53\u4f60\u542f\u7528\u4e86\u6b63\u5219\u8868\u8fbe\u5f0f\u4e4b\u540e\uff0c\u53ef\u4ee5\u5728\u67e5\u627e\u6846\u4e2d\u4f7f\u7528\u6b63\u5219\u8bed\u6cd5\u6765\u5b9a\u4f4d\u9700\u8981\u66ff\u6362\u7684\u6587\u672c\u3002\u6bd4\u5982\uff0c\u8981\u66ff\u6362\u4ee5&quot;word&quot;\u5305\u56f4\u7684\u4efb\u610f\u5b57\u7b26\uff0c\u4f60\u53ef\u4ee5\u8fd9\u6837\u5199\uff1a<\/p>\n<\/p>\n<p><pre><code>word(.*)word<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>.*<\/code>\u4ee3\u8868\u4efb\u610f\u4e2a\u5b57\u7b26\uff0c\u62ec\u53f7<code>()<\/code>\u521b\u5efa\u4e86\u4e00\u4e2a\u6355\u83b7\u7ec4\uff0c\u8fd9\u610f\u5473\u7740\u62ec\u53f7\u4e2d\u7684\u5185\u5bb9\u4f1a\u88ab\u8bb0\u4f4f\u5e76\u4e14\u53ef\u4ee5\u5728\u66ff\u6362\u65f6\u5f15\u7528\u3002<\/p>\n<\/p>\n<p><h3>\u4e09\u3001\u8fdb\u884c\u66ff\u6362\u64cd\u4f5c<\/h3>\n<\/p>\n<p><p>\u5728\u66ff\u6362\u6846\u4e2d\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528<code>$<\/code>\u540e\u8ddf\u6570\u5b57\u6765\u5f15\u7528\u5bf9\u5e94\u7684\u6355\u83b7\u7ec4\u3002\u5982\u679c\u4f60\u60f3\u5728\u4e24\u8fb9\u5185\u5bb9\u4e2d\u95f4\u6dfb\u52a0\u4e00\u4e9b\u6587\u672c\uff0c\u6bd4\u5982&quot;inserted text&quot;\uff0c\u4f60\u53ef\u4ee5\u8fd9\u6837\u66ff\u6362\uff1a<\/p>\n<\/p>\n<p><pre><code>word$1inserted textword<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u60f3\u66ff\u6362\u4e24\u8fb9\u7684&quot;word&quot;\u4e3a&quot;vscode&quot;\uff0c\u90a3\u4e48\u53ef\u4ee5\u8fd9\u6837\u5199\uff1a<\/p>\n<\/p>\n<p><pre><code>vscode$1vscode<\/p>\n<p><\/code><\/pre>\n<\/p>\n<p><h3>\u56db\u3001\u9ad8\u7ea7\u66ff\u6362\u6280\u5de7<\/h3>\n<\/p>\n<p><p>\u5982\u679c\u4f60\u9700\u8981\u66f4\u590d\u6742\u7684\u66ff\u6362\uff0c\u6bd4\u5982\u5728\u539f\u672c\u7684\u57fa\u7840\u4e0a\u8fdb\u884c\u6dfb\u52a0\u6216\u4fee\u6539\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528\u66f4\u591a\u7684\u6355\u83b7\u7ec4\uff0c\u5e76\u5728\u66ff\u6362\u6846\u4e2d\u5408\u7406\u5f15\u7528\u5b83\u4eec\u3002<\/p>\n<\/p>\n<p><p>\u4f8b\u5982\uff0c\u6587\u7ae0\u4e2d\u6709\u8bb8\u591a\u65e5\u671f\u683c\u5f0f\u5982&quot;2021-01-01&quot;\uff0c\u4f60\u60f3\u5c06\u5176\u66f4\u6539\u4e3a&quot;01\/01\/2021&quot;\u7684\u683c\u5f0f\uff0c\u53ef\u4ee5\u8fd9\u6837\u8fdb\u884c\u67e5\u627e\u548c\u66ff\u6362\uff1a<\/p>\n<\/p>\n<p><p>\u67e5\u627e\uff1a<code>(\\d{4})-(\\d{2})-(\\d{2})<\/code><\/p>\n<p>\u66ff\u6362\uff1a<code>$3\/$2\/$1<\/code><\/p>\n<\/p>\n<p><p>\u5728\u8fd9\u91cc\uff0c<code>(\\d{4})<\/code>\u5339\u914d\u4e86\u56db\u4f4d\u6570\u5b57\u7684\u5e74\u4efd\uff0c\u5e76\u4f5c\u4e3a\u7b2c\u4e00\u4e2a\u6355\u83b7\u7ec4\uff0c<code>(\\d{2})<\/code>\u4e24\u6b21\u5206\u522b\u5339\u914d\u4e86\u4e24\u4f4d\u6570\u5b57\u7684\u6708\u4efd\u548c\u65e5\u671f\uff0c\u5e76\u4f5c\u4e3a\u7b2c\u4e8c\u4e2a\u548c\u7b2c\u4e09\u4e2a\u6355\u83b7\u7ec4\u3002\u7136\u540e\u5728\u66ff\u6362\u6846\u4e2d\u4f7f\u7528<code>$3\/$2\/$1<\/code>\u6765\u5f15\u7528\u5e76\u91cd\u6392\u8fd9\u4e9b\u6355\u83b7\u7ec4\uff0c\u5728\u5b83\u4eec\u4e4b\u95f4\u63d2\u5165\u659c\u7ebf\u3002<\/p>\n<\/p>\n<p><p>\u901a\u8fc7\u8fd9\u4e9b\u9ad8\u7ea7\u6280\u5de7\uff0c\u4f60\u53ef\u4ee5\u5904\u7406\u5404\u79cd\u5404\u6837\u7684\u6587\u672c\u66ff\u6362\u9700\u6c42\u3002<strong>\u8bb0\u4f4f\uff0c\u8fd0\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u548c\u6355\u83b7\u7ec4\u914d\u5408\uff0c\u53ef\u4ee5\u8f7b\u677e\u5b9e\u73b0\u5728VSCode\u4e2d\u5bf9\u4e24\u8fb9\u5185\u5bb9\u8fdb\u884c\u590d\u6742\u7684\u67e5\u627e\u548c\u66ff\u6362\u64cd\u4f5c\u3002<\/strong><\/p>\n<\/p>\n<p><p><strong>\u603b\u800c\u8a00\u4e4b\uff0cVSCode\u7684\u5f3a\u5927\u529f\u80fd\u4f7f\u5f97\u7f16\u8f91\u548c\u6574\u7406\u6587\u672c\u53d8\u5f97\u5f02\u5e38\u8f7b\u677e\u3002\u53ea\u9700\u8981\u638c\u63e1\u4e00\u4e9b\u57fa\u672c\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u548c\u6355\u83b7\u7ec4\u77e5\u8bc6\uff0c\u4f60\u5c31\u80fd\u9ad8\u6548\u5730\u8fdb\u884c\u6587\u672c\u5904\u7406\u3002<\/strong> \u4e0d\u8981\u5fd8\u8bb0\u5b9e\u8df5\u8fd9\u4e9b\u6280\u5de7\u4ee5\u719f\u6089\u5b83\u4eec\uff0c\u8fd9\u5c06\u5927\u5e45\u63d0\u5347\u4f60\u5728\u6587\u672c\u7f16\u8f91\u65b9\u9762\u7684\u5de5\u4f5c\u6548\u7387\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p><strong>1. \u5982\u4f55\u5728vscode\u4e2d\u8fdb\u884c\u5168\u5c40\u66ff\u6362\uff1f<\/strong><\/p>\n<p>\u5728vscode\u4e2d\uff0c\u53ef\u4ee5\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl+Shift+F<\/code>\u6216\u8005\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684\u201c\u7f16\u8f91\u201d-&gt;\u201c\u67e5\u627e\u201d-&gt;\u201c\u66ff\u6362\u201d\u6765\u6253\u5f00\u5168\u5c40\u66ff\u6362\u9762\u677f\u3002\u5728\u66ff\u6362\u9762\u677f\u4e2d\uff0c\u4f60\u53ef\u4ee5\u8f93\u5165\u8981\u67e5\u627e\u548c\u66ff\u6362\u7684\u5185\u5bb9\uff0c\u7136\u540e\u70b9\u51fb\u201c\u5168\u90e8\u66ff\u6362\u201d\u6309\u94ae\u6765\u66ff\u6362\u6240\u6709\u5339\u914d\u5230\u7684\u5185\u5bb9\u3002<\/p>\n<p><strong>2. \u5982\u4f55\u5728vscode\u4e2d\u5c40\u90e8\u66ff\u6362\u9009\u4e2d\u7684\u5185\u5bb9\uff1f<\/strong><\/p>\n<p>\u5982\u679c\u4f60\u53ea\u60f3\u66ff\u6362\u9009\u4e2d\u7684\u90e8\u5206\u5185\u5bb9\uff0c\u53ef\u4ee5\u5148\u9009\u4e2d\u8981\u66ff\u6362\u7684\u6587\u672c\uff0c\u7136\u540e\u4f7f\u7528\u5feb\u6377\u952e<code>Ctrl+H<\/code>\u6216\u8005\u70b9\u51fb\u83dc\u5355\u680f\u4e2d\u7684\u201c\u7f16\u8f91\u201d-&gt;\u201c\u66ff\u6362\u201d\u6765\u6253\u5f00\u66ff\u6362\u9762\u677f\u3002\u5728\u66ff\u6362\u9762\u677f\u4e2d\uff0c\u4f60\u53ef\u4ee5\u8f93\u5165\u8981\u66ff\u6362\u7684\u5185\u5bb9\uff0c\u7136\u540e\u70b9\u51fb\u201c\u66ff\u6362\u201d\u6309\u94ae\u6765\u66ff\u6362\u9009\u4e2d\u7684\u5185\u5bb9\u3002<\/p>\n<p><strong>3. \u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u66ff\u6362\uff1f<\/strong><\/p>\n<p>\u5728vscode\u7684\u66ff\u6362\u9762\u677f\u4e2d\uff0c\u4f60\u8fd8\u53ef\u4ee5\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u8fdb\u884c\u66f4\u52a0\u7075\u6d3b\u7684\u66ff\u6362\u3002\u5728\u66ff\u6362\u9762\u677f\u7684\u8f93\u5165\u6846\u4e2d\uff0c\u4f60\u53ef\u4ee5\u52fe\u9009\u201c\u6b63\u5219\u8868\u8fbe\u5f0f\u201d\u9009\u9879\uff0c\u7136\u540e\u8f93\u5165\u76f8\u5e94\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u5339\u914d\u8981\u66ff\u6362\u7684\u5185\u5bb9\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4f60\u60f3\u5c06\u6240\u6709\u7684\u6570\u5b57\u66ff\u6362\u4e3a\u7a7a\u5b57\u7b26\u4e32\uff0c\u4f60\u53ef\u4ee5\u8f93\u5165<code>\\d+<\/code>\u4f5c\u4e3a\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u7136\u540e\u8fdb\u884c\u66ff\u6362\u64cd\u4f5c\u3002\u6ce8\u610f\uff0c\u5728\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u66ff\u6362\u65f6\uff0c\u4e00\u5b9a\u8981\u8c28\u614e\u64cd\u4f5c\uff0c\u907f\u514d\u66ff\u6362\u51fa\u9519\u5bfc\u81f4\u610f\u5916\u7ed3\u679c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"VSCode\u6587\u672c\u7f16\u8f91\u5668\u4e2d\u7684\u67e5\u627e\u548c\u66ff\u6362\u529f\u80fd\u662f\u975e\u5e38\u5f3a\u5927\u7684\u3001\u591a\u6837\u5316\u7684\u3002\u82e5\u60f3\u66ff\u6362\u4e24\u8fb9\u5185\u5bb9\uff0c\u5373\u5728\u7ed9\u5b9a\u7684\u5b57\u7b26\u4e32\u524d\u540e\u6dfb\u52a0\u6216\u66f4 [&hellip;]","protected":false},"author":3,"featured_media":221956,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[37],"tags":[],"acf":[],"_links":{"self":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/221944"}],"collection":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/comments?post=221944"}],"version-history":[{"count":0,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/221944\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/221956"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=221944"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=221944"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=221944"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}