{"id":1367,"date":"2020-07-25T11:55:10","date_gmt":"2020-07-25T11:55:10","guid":{"rendered":"http:\/\/www.fyndpro.com\/?p=1367"},"modified":"2024-09-15T22:59:17","modified_gmt":"2024-09-15T14:59:17","slug":"quickly-swap-positions-of-chinese-and-english-words","status":"publish","type":"post","link":"https:\/\/www.fyndpro.com\/en\/quickly-swap-positions-of-chinese-and-english-words\/","title":{"rendered":"Quickly Swap Positions of Chinese and English Words"},"content":{"rendered":"<p>When editing a Word document that contains both Chinese and English text, you may need to combine lines, swap positions, or remove spaces between Chinese and English characters.<br \/>\n\u5728\u7de8\u8f2f\u5305\u542b\u4e2d\u6587\u548c\u82f1\u6587\u6587\u672c\u7684Word\u6587\u6a94\u6642\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u5408\u4f75\u884c\u3001\u4ea4\u63db\u4f4d\u7f6e\u6216\u522a\u9664\u4e2d\u6587\u548c\u82f1\u6587\u5b57\u7b26\u4e4b\u9593\u7684\u7a7a\u683c\u3002<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2892\" src=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=1024%2C403&#038;ssl=1\" alt=\"\" width=\"1024\" height=\"403\" srcset=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=1024%2C403&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=300%2C118&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=150%2C59&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=768%2C302&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=1536%2C605&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=2048%2C806&amp;ssl=1 2048w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-1.png?resize=18%2C7&amp;ssl=1 18w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3>Swap Positions of Chinese and English Text<\/h3>\n<h3>\u4ea4\u63db\u4e2d\u6587\u548c\u82f1\u6587\u6587\u672c\u7684\u4f4d\u7f6e<\/h3>\n<ol>\n<li>Press Ctrl + H to open the \u201cFind and Replace\u201d dialog.<br \/>\n\u6309Ctrl + H\u6253\u958b\u201c\u67e5\u627e\u548c\u66ff\u63db\u201d\u5c0d\u8a71\u6846\u3002<\/li>\n<li>Click on the Advanced button and check the Use wildcards checkbox.<br \/>\n\u9ede\u64ca\u201c\u9ad8\u7d1a\u201d\u6309\u9215\u4e26\u52fe\u9078\u201c\u4f7f\u7528\u901a\u914d\u7b26\u201d\u9078\u6846\u3002<\/li>\n<li>Enter the following in the Find what field: ([\u4e00-\u9fa5]@)([a-zA-Z]@)^13<br \/>\n\u5728\u201c\u67e5\u627e\u5167\u5bb9\u201d\u5b57\u6bb5\u4e2d\u8f38\u5165\u4ee5\u4e0b\u5167\u5bb9\uff1a ([\u4e00-\u9fa5]@)([a-zA-Z]@)^13<\/li>\n<li>Enter the following in the Replace with field: \\2\\1^p<br \/>\n\u5728\u201c\u66ff\u63db\u70ba\u201d\u5b57\u6bb5\u4e2d\u8f38\u5165\u4ee5\u4e0b\u5167\u5bb9\uff1a \\2\\1^p<\/li>\n<li>Click on Replace All.<br \/>\n\u9ede\u64ca\u201c\u5168\u90e8\u66ff\u63db\u201d\u3002<\/li>\n<\/ol>\n<p>This will remove all spaces between Chinese and English characters in the document.<br \/>\n\u9019\u5c07\u522a\u9664\u6587\u6a94\u4e2d\u6240\u6709\u4e2d\u6587\u548c\u82f1\u6587\u5b57\u7b26\u4e4b\u9593\u7684\u7a7a\u683c\u3002<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2893\" src=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?resize=1024%2C985&#038;ssl=1\" alt=\"\" width=\"1024\" height=\"985\" srcset=\"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?resize=1024%2C985&amp;ssl=1 1024w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?resize=300%2C288&amp;ssl=1 300w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?resize=150%2C144&amp;ssl=1 150w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?resize=768%2C738&amp;ssl=1 768w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?resize=1536%2C1477&amp;ssl=1 1536w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?resize=12%2C12&amp;ssl=1 12w, https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/W0001-2.png?w=1973&amp;ssl=1 1973w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/p>\n<h3>Explanation of the Code<\/h3>\n<h3>\u4ee3\u78bc\u89e3\u91cb<\/h3>\n<p>The code ([\u4e00-\u9fa5]@)([a-zA-Z]@)^13 is used in the context of the \u201cFind and Replace\u201d function in word processing software like Microsoft Word, particularly when dealing with documents containing both Chinese and English text.<br \/>\n\u9019\u6bb5\u4ee3\u78bc ([\u4e00-\u9fa5]@)([a-zA-Z]@)^13 \u7528\u65bc\u6587\u5b57\u8655\u7406\u8edf\u9ad4\uff08\u5982Microsoft Word\uff09\u7684\u201c\u67e5\u627e\u548c\u66ff\u63db\u201d\u529f\u80fd\uff0c\u7279\u5225\u662f\u5728\u8655\u7406\u5305\u542b\u4e2d\u6587\u548c\u82f1\u6587\u6587\u672c\u7684\u6587\u6a94\u6642\u3002<\/p>\n<h3>Explanation of the Code Components<\/h3>\n<h3>\u4ee3\u78bc\u7d44\u4ef6\u89e3\u91cb<\/h3>\n<ul>\n<li><strong>([\u4e00-\u9fa5]@):<\/strong>\n<ul>\n<li>[\u4e00-\u9fa5]: This part specifies a range of characters. It matches any Chinese character from \u4e00 to \u9fa5. This range includes most common Chinese characters.\n<p>[\u4e00-\u9fa5]\uff1a\u9019\u90e8\u5206\u6307\u5b9a\u4e86\u4e00\u500b\u5b57\u7b26\u7bc4\u570d\u3002\u5b83\u5339\u914d\u5f9e \u4e00 \u5230 \u9fa5 \u7684\u4efb\u4f55\u4e2d\u6587\u5b57\u7b26\u3002\u9019\u500b\u7bc4\u570d\u5305\u62ec\u5927\u591a\u6578\u5e38\u898b\u7684\u4e2d\u6587\u5b57\u7b26\u3002<\/li>\n<li>@: This symbol is a wildcard that indicates \u201cone or more of the preceding characters.\u201d In this case, it means one or more Chinese characters.\n<p>@\uff1a\u9019\u500b\u7b26\u865f\u662f\u4e00\u500b\u901a\u914d\u7b26\uff0c\u8868\u793a\u201c\u524d\u9762\u5b57\u7b26\u7684\u4e00\u500b\u6216\u591a\u500b\u201d\u3002\u5728\u9019\u7a2e\u60c5\u6cc1\u4e0b\uff0c\u5b83\u8868\u793a\u4e00\u500b\u6216\u591a\u500b\u4e2d\u6587\u5b57\u7b26\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>([a-zA-Z]@):<\/strong>\n<ul>\n<li>[a-zA-Z]: This specifies a range of characters that includes all lowercase and uppercase English letters (from a to z and A to Z).\n<p>[a-zA-Z]\uff1a\u9019\u6307\u5b9a\u4e86\u4e00\u500b\u5b57\u7b26\u7bc4\u570d\uff0c\u5305\u62ec\u6240\u6709\u5c0f\u5beb\u548c\u5927\u5beb\u7684\u82f1\u6587\u5b57\u6bcd\uff08\u5f9ea\u5230z\u548cA\u5230Z\uff09\u3002<\/li>\n<li>@: Similar to the previous use, this wildcard indicates \u201cone or more of the preceding characters,\u201d meaning it will match one or more English letters.\n<p>@\uff1a\u8207\u524d\u9762\u7684\u7528\u6cd5\u985e\u4f3c\uff0c\u9019\u500b\u901a\u914d\u7b26\u8868\u793a\u201c\u524d\u9762\u5b57\u7b26\u7684\u4e00\u500b\u6216\u591a\u500b\u201d\uff0c\u610f\u5473\u8457\u5b83\u5c07\u5339\u914d\u4e00\u500b\u6216\u591a\u500b\u82f1\u6587\u5b57\u6bcd\u3002<\/li>\n<\/ul>\n<\/li>\n<li><strong>^13:<\/strong>\n<ul>\n<li>This represents a carriage return (or line break). In the context of \u201cFind and Replace,\u201d it is used to match the end of a line, indicating that the previous characters (both Chinese and English) appear before a new line.\n<p>\u9019\u8868\u793a\u4e00\u500b\u63db\u884c\u7b26\uff08\u6216\u884c\u7d50\u675f\uff09\u3002\u5728\u201c\u67e5\u627e\u548c\u66ff\u63db\u201d\u7684\u4e0a\u4e0b\u6587\u4e2d\uff0c\u5b83\u7528\u65bc\u5339\u914d\u4e00\u884c\u7684\u7d50\u5c3e\uff0c\u8868\u793a\u524d\u9762\u7684\u5b57\u7b26\uff08\u5305\u62ec\u4e2d\u6587\u548c\u82f1\u6587\uff09\u51fa\u73fe\u5728\u65b0\u884c\u4e4b\u524d\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<h3>\u7e3d\u7d50<\/h3>\n<p>Putting it all together, the expression ([\u4e00-\u9fa5]@)([a-zA-Z]@)^13 is used to find instances in a document where one or more Chinese characters are followed by one or more English letters, and then followed by a line break.<br \/>\n\u7d9c\u5408\u4f86\u770b\uff0c\u8868\u9054\u5f0f ([\u4e00-\u9fa5]@)([a-zA-Z]@)^13 \u7528\u65bc\u67e5\u627e\u6587\u6a94\u4e2d\u4e00\u500b\u6216\u591a\u500b\u4e2d\u6587\u5b57\u7b26\u5f8c\u9762\u8ddf\u96a8\u4e00\u500b\u6216\u591a\u500b\u82f1\u6587\u5b57\u6bcd\uff0c\u7136\u5f8c\u518d\u8ddf\u96a8\u4e00\u500b\u63db\u884c\u7b26\u7684\u5be6\u4f8b\u3002<\/p>\n<hr \/>\n<p>The code \\2\\1^p is used in the context of the \u201cFind and Replace\u201d function in word processing software, such as Microsoft Word.<br \/>\n\u4ee3\u78bc \\2\\1^p \u7528\u65bc\u6587\u5b57\u8655\u7406\u8edf\u9ad4\uff08\u5982Microsoft Word\uff09\u7684\u201c\u67e5\u627e\u548c\u66ff\u63db\u201d\u529f\u80fd\u7684\u4e0a\u4e0b\u6587\u4e2d\u3002<\/p>\n<p>This code is typically part of a replacement string that specifies how to format the text that matches a certain pattern defined in a previous \u201cFind\u201d operation.<br \/>\n\u9019\u6bb5\u4ee3\u78bc\u901a\u5e38\u662f\u66ff\u63db\u5b57\u7b26\u4e32\u7684\u4e00\u90e8\u5206\uff0c\u6307\u5b9a\u5982\u4f55\u683c\u5f0f\u5316\u8207\u5148\u524d\u201c\u67e5\u627e\u201d\u64cd\u4f5c\u4e2d\u5b9a\u7fa9\u7684\u67d0\u500b\u6a21\u5f0f\u5339\u914d\u7684\u6587\u672c\u3002<\/p>\n<p>Let\u2019s break it down:<br \/>\n\u8b93\u6211\u5011\u4f86\u62c6\u89e3\u4e00\u4e0b\uff1a<\/p>\n<h3>Explanation of the Code Components<\/h3>\n<h3>\u4ee3\u78bc\u7d44\u4ef6\u89e3\u91cb<\/h3>\n<ul>\n<li>\\2:\n<ul>\n<li>This refers to the content captured in the second set of parentheses in the \u201cFind\u201d expression. In the context of a \u201cFind and Replace\u201d operation, each set of parentheses creates a capture group, which can be referenced later in the replacement string.\n<p>\u9019\u662f\u6307\u5728\u201c\u67e5\u627e\u201d\u8868\u9054\u5f0f\u4e2d\u7b2c\u4e8c\u7d44\u62ec\u865f\u6355\u7372\u7684\u5167\u5bb9\u3002\u5728\u201c\u67e5\u627e\u548c\u66ff\u63db\u201d\u64cd\u4f5c\u7684\u4e0a\u4e0b\u6587\u4e2d\uff0c\u6bcf\u7d44\u62ec\u865f\u5275\u5efa\u4e00\u500b\u6355\u7372\u7d44\uff0c\u53ef\u4ee5\u5728\u66ff\u63db\u5b57\u7b26\u4e32\u4e2d\u7a0d\u5f8c\u5f15\u7528\u3002<\/li>\n<li>For example, if the \u201cFind\u201d expression was ([a-zA-Z]@)([\u4e00-\u9fa5]@), then \\2 would represent the part of the text that matched the second group (the Chinese characters).\n<p>\u4f8b\u5982\uff0c\u5982\u679c\u201c\u67e5\u627e\u201d\u8868\u9054\u5f0f\u662f ([a-zA-Z]@)([\u4e00-\u9fa5]@)\uff0c\u90a3\u9ebc \\2 \u4ee3\u8868\u8207\u7b2c\u4e8c\u7d44\uff08\u4e2d\u6587\u5b57\u7b26\uff09\u5339\u914d\u7684\u6587\u672c\u90e8\u5206\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\\1:\n<ul>\n<li>This refers to the content captured in the first set of parentheses in the \u201cFind\u201d expression. Like \\2, it allows you to insert captured content back into the replacement string.\n<p>\u9019\u662f\u6307\u5728\u201c\u67e5\u627e\u201d\u8868\u9054\u5f0f\u4e2d\u7b2c\u4e00\u7d44\u62ec\u865f\u6355\u7372\u7684\u5167\u5bb9\u3002\u8207 \\2 \u985e\u4f3c\uff0c\u5b83\u5141\u8a31\u60a8\u5c07\u6355\u7372\u7684\u5167\u5bb9\u63d2\u5165\u56de\u66ff\u63db\u5b57\u7b26\u4e32\u4e2d\u3002<\/li>\n<li>Continuing the same example, \\1 would represent the part of the text that matched the first group (the English letters).\n<p>\u7e7c\u7e8c\u4ee5\u4e0a\u793a\u4f8b\uff0c\\1 \u4ee3\u8868\u8207\u7b2c\u4e00\u7d44\uff08\u82f1\u6587\u5b57\u6bcd\uff09\u5339\u914d\u7684\u6587\u672c\u90e8\u5206\u3002<\/li>\n<\/ul>\n<\/li>\n<li>^p:\n<ul>\n<li>This represents a paragraph mark (or line break) in the replacement string. It indicates that a new line should be inserted after the replaced content.\n<p>\u9019\u8868\u793a\u66ff\u63db\u5b57\u7b26\u4e32\u4e2d\u7684\u6bb5\u843d\u6a19\u8a18\uff08\u6216\u63db\u884c\u7b26\uff09\u3002\u5b83\u8868\u793a\u5728\u66ff\u63db\u5167\u5bb9\u4e4b\u5f8c\u61c9\u63d2\u5165\u4e00\u500b\u65b0\u884c\u3002<\/li>\n<li>This is useful for formatting purposes, as it will create a new line in the document where the replacement occurs.\n<p>\u9019\u5c0d\u683c\u5f0f\u5316\u975e\u5e38\u6709\u7528\uff0c\u56e0\u70ba\u5b83\u6703\u5728\u767c\u751f\u66ff\u63db\u7684\u6587\u6a94\u4e2d\u5275\u5efa\u4e00\u500b\u65b0\u884c\u3002<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<h3>Summary<\/h3>\n<h3>\u7e3d\u7d50<\/h3>\n<p>Putting it all together, \\2\\1^p means that when a match is found (based on the \u201cFind\u201d expression), the replacement will consist of:<br \/>\n\u7d9c\u5408\u4f86\u770b\uff0c\\2\\1^p \u7684\u610f\u601d\u662f\u7576\u627e\u5230\u5339\u914d\u6642\uff08\u6839\u64da\u201c\u67e5\u627e\u201d\u8868\u9054\u5f0f\uff09\uff0c\u66ff\u63db\u5c07\u7531\u4ee5\u4e0b\u5167\u5bb9\u7d44\u6210\uff1a<\/p>\n<ul>\n<li>The content of the second capture group (e.g., the Chinese characters) first,\n<p>\u7b2c\u4e8c\u500b\u6355\u7372\u7d44\u7684\u5167\u5bb9\uff08\u4f8b\u5982\uff0c\u4e2d\u6587\u5b57\u7b26\uff09\u9996\u5148\uff0c<\/li>\n<li>Followed by the content of the first capture group (e.g., the English letters),\n<p>\u7136\u5f8c\u662f\u7b2c\u4e00\u500b\u6355\u7372\u7d44\u7684\u5167\u5bb9\uff08\u4f8b\u5982\uff0c\u82f1\u6587\u5b57\u6bcd\uff09\uff0c<\/li>\n<li>And then a new line (paragraph mark) will be added after this combined content.\n<p>\u7136\u5f8c\u5728\u9019\u500b\u7d44\u5408\u5167\u5bb9\u4e4b\u5f8c\u5c07\u6dfb\u52a0\u4e00\u500b\u65b0\u884c\uff08\u6bb5\u843d\u6a19\u8a18\uff09\u3002<\/li>\n<\/ul>\n<p><em>W0001<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>When editing a Word document that contains both Chinese [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2891,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[94,20,30],"tags":[38],"class_list":["post-1367","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-find-and-replace","category-onlinesupport","category-word","tag-find_and_replace"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.fyndpro.com\/wp-content\/uploads\/2020\/07\/Word-new1.png?fit=2102%2C679&ssl=1","_links":{"self":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts\/1367","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/comments?post=1367"}],"version-history":[{"count":9,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts\/1367\/revisions"}],"predecessor-version":[{"id":2898,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/posts\/1367\/revisions\/2898"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/media\/2891"}],"wp:attachment":[{"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/media?parent=1367"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/categories?post=1367"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fyndpro.com\/en\/wp-json\/wp\/v2\/tags?post=1367"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}