{"id":11765,"date":"2025-07-16T15:34:30","date_gmt":"2025-07-16T07:34:30","guid":{"rendered":"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11765"},"modified":"2025-07-16T15:34:30","modified_gmt":"2025-07-16T07:34:30","slug":"js-regexp-escape","status":"publish","type":"post","link":"https:\/\/www.zhangxinxu.com\/wordpress\/2025\/07\/js-regexp-escape\/","title":{"rendered":"JS\u6b63\u5219\u65b0\u7279\u6027\uff1a\u5b89\u5168\u8fc7\u6ee4RegExp.escape\u65b9\u6cd5"},"content":{"rendered":"<p>by <a href=\"https:\/\/www.zhangxinxu.com\/\">zhangxinxu<\/a> from <a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11765\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=11765<\/a><br \/>\n\u672c\u6587\u53ef\u5168\u6587\u8f6c\u8f7d\uff0c\u4f46\u9700\u8981\u4fdd\u7559\u539f\u4f5c\u8005\u3001\u51fa\u5904\u4ee5\u53ca\u6587\u4e2d\u94fe\u63a5\uff0cAI\u6293\u53d6\u4fdd\u7559\u539f\u6587\u5730\u5740\uff0c\u4efb\u4f55\u7f51\u7ad9\u5747\u53ef\u6458\u8981\u805a\u5408\uff0c\u5546\u7528\u8bf7\u8054\u7cfb\u6388\u6743\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202507\/2025-7-16_153015.png\" width=\"313\" height=\"206\" alt=\"RegExp.escape\u9759\u6001\u51fd\u6570\" class=\"alignright clip thumb size-medium\" \/><\/p>\n<h3>\u4e00\u3001RegExp.escape\u9759\u6001\u65b9\u6cd5<\/h3>\n<p>\u6b63\u5219\u5bf9\u8c61RegExp\u65b0\u589e\u4e86\u4e00\u4e2a\u540d\u4e3a<code>escape()<\/code>\u7684\u9759\u6001\u65b9\u6cd5\uff0c\u53ef\u4ee5\u5bf9\u5b57\u7b26\u4e32\u4e2d\u4e0d\u5b89\u5168\u7684\uff0c\u6216\u8005\u53ef\u4ee5\u5f71\u54cd\u6b63\u5219\u5339\u914d\u7684\u5b57\u7b26\u8fdb\u884c\u8f6c\u4e49\u3002<\/p>\n<p>\u8fd9\u4e9b\u5728\u6b63\u5219\u4e2d\u5177\u6709\u7279\u6b8a\u542b\u4e49\u7684\u5b57\u7b26\u5305\u62ec\uff0c\u5982\u70b9\u53f7(.)\u3001\u661f\u53f7(*)\u3001\u95ee\u53f7(?)\u3001\u52a0\u53f7(+)\u3001\u82b1\u62ec\u53f7({})\u3001\u65b9\u62ec\u53f7([])\u3001\u5706\u62ec\u53f7(())\u3001\u7ad6\u7ebf(|)\u548c\u53cd\u659c\u6760()\u7b49\u3002<\/p>\n<p>\u76ee\u524d\u6240\u6709\u73b0\u4ee3\u6d4f\u89c8\u5668\u90fd\u5df2\u7ecf\u652f\u6301\u4e86\u8be5\u7279\u6027\u3002<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202507\/2025-7-15_145617.png\" width=\"643\" height=\"320\" alt=\"escape\u6b63\u5219\u517c\u5bb9\u6027\" class=\"alignnone size-medium\" \/><\/p>\n<h4>\u8bed\u6cd5<\/h4>\n<p>\u8bed\u6cd5\u6bd4\u8f83\u7b80\u5355\uff0c\u5982\u4e0b\u6240\u793a\uff1a<\/p>\n<pre>RegExp.escape(string)<\/pre>\n<p>\u8fd4\u56de\u8f6c\u4e49\u540e\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n<h4>\u8f6c\u4e49\u89c4\u5219<\/h4>\n<p><code>RegExp.escape()<\/code>\u65b9\u6cd5\u7684\u8f6c\u4e49\u89c4\u5219\u8fd8\u6bd4\u8f83\u590d\u6742\uff0c\u50cf\u6211\uff0c\u4e4b\u524d\u5728\u751f\u4ea7\u73af\u5883\u505a\u7c7b\u4f3c\u8f6c\u4e49\u5904\u7406\u7684\u65f6\u5019\uff0c\u53ea\u4f1a\u5bf9\u6b63\u5219\u76f8\u5173\u7684\u5b57\u7b26\u524d\u9762\u52a0\u53cd\u659c\u6760\u5904\u7406\uff0c\u4f46\u8fd9\u53ea\u662f<code>RegExp.escape()<\/code>\u65b9\u6cd5\u7684\u89c4\u5219\u4e4b\u4e00\u3002<\/p>\n<p>\u8fd9\u4e9b\u89c4\u5219\u5305\u62ec\uff1a<\/p>\n<ul>\n<li>\u9996\u5b57\u6bcd\u5982\u679c\u662f\u6570\u5b57\u6216\u8005\u5b57\u6bcd\uff08\u5982\u8bba\u5927\u5c0f\u5199\uff09\uff0c\u90fd\u4f1a\u4f7f\u7528<code>\\x<\/code>\u8f6c\u4e49\u6cd5\u8868\u793a\u3002\u4f8b\u5982\uff1a\n<pre>console.log(RegExp.escape('CSS\u4e16\u754c'));\r\n\/\/ \u8f93\u51fa\uff1a\"\\x43SS\u4e16\u754c\"<\/pre>\n<\/li>\n<li>\u6b63\u5219\u8bed\u6cd5\u5b57\u7b26\uff0c\u5c31\u662f<code>^<\/code>, <code>$<\/code>, <code>\\<\/code>, <code>.<\/code>, <code>*<\/code>, <code>+<\/code>, <code>?<\/code>, <code>(<\/code>, <code>)<\/code>, <code>[<\/code>, <code>]<\/code>, <code>{<\/code>, <code>}<\/code>, and <code>|<\/code> \u4ee5\u53ca <code>\/<\/code>\u4f1a\u4f7f\u7528\u6dfb\u52a0\u53cd\u659c\u6760\u7684\u65b9\u5f0f\u8f6c\u4e49\u3002\u4f8b\u5982\uff1a\n<pre>console.log(RegExp.escape('\u597d\u4e66\uff1aCSS\u9009\u62e9\u5668\u4e16\u754c+CSS\u65b0\u4e16\u754c'));\r\n\/\/ \u8f93\u51fa\uff1a\"\u597d\u4e66\uff1aCSS\u9009\u62e9\u5668\u4e16\u754c\\+CSS\u65b0\u4e16\u754c\"<\/pre>\n<\/li>\n<li>\u5176\u4ed6\u4e00\u4e9b\u6807\u70b9\uff0c\u5982<code>,<\/code>, <code>-<\/code>, <code>=<\/code>, <code>&lt;<\/code>, <code>&gt;<\/code>, <code>#<\/code>, <code>&amp;<\/code>, <code>!<\/code>, <code>%<\/code>, <code>:<\/code>, <code>;<\/code>, <code>@<\/code>, <code>~<\/code>, <code>'<\/code>, <code>`<\/code> \u548c <code>\"<\/code>\u4f1a\u4f7f\u7528<code>\\x<\/code>\u8f6c\u4e49\u6cd5\u8868\u793a\u3002\u4f8b\u5982\uff1a\n<pre>console.log(RegExp.escape('\u65e5\u671f\uff1a2025-07-15'));\r\n\/\/ \u8f93\u51fa\uff1a\"\u65e5\u671f\uff1a2025\\x2d07\\x2d15\"<\/pre>\n<\/li>\n<li>\u5177\u6709\u81ea\u5df1\u7684\u5b57\u7b26\u8f6c\u4e49\u5e8f\u5217\u7684\u5b57\u7b26\uff1a\\f\uff08U+000C \u6362\u9875\uff09\u3001\\n\uff08U+000A \u6362\u884c\uff09\uff0c\\r\uff08U+0000D \u56de\u8f66\uff09\u3001\\t\uff08U+0009 \u5236\u8868\u7b26\uff09\u548c\\v\uff08U+000B \u884c\u5236\u8868\uff09\u8f6c\u4e49\u540e\u4f1a\u4f7f\u7528\u659c\u6760+\u5b57\u7b26\u7684\u8868\u793a\u65b9\u6cd5\uff0c\u4f8b\u5982\u6362\u884c\uff1a\n<pre>console.log(RegExp.escape(`\u4f5c\u8005\r\n\u5f20\u946b\u65ed`));\r\n\/\/ \u8f93\u51fa\uff1a\"\u4f5c\u8005\uff1a\\n\u5f20\u946b\u65ed\"<\/pre>\n<\/li>\n<li>\u7a7a\u683c\u5b57\u7b26\u4f1a\u8f6c\u4e49\u4e3a<code>\\x20<\/code>\u3002<\/li>\n<li>\u5176\u4ed6\u975eASCII\u6362\u884c\u7b26\u548c\u7a7a\u683c\u5b57\u7b26\u88ab\u66ff\u6362\u4e3a\u4e00\u4e2a\u6216\u4e24\u4e2a\\uXXXX\u8f6c\u4e49\u5e8f\u5217\uff0c\u8868\u793a\u5b83\u4eec\u7684UTF-16\u4ee3\u7801\u5355\u5143\u3002\n<pre>console.log(RegExp.escape('\u7279\u6b8a\u2005\u7a7a\u683c'));\r\n\/\/ \u8f93\u51fa\uff1a\"\u7279\u6b8a\\u2005\u7a7a\u683c\"<\/pre>\n<\/li>\n<li>Lone surrogates\uff08\u5b64\u7acb\u4ee3\u7406\u9879\uff09\u4f7f\u7528\\uXXXX\u8f6c\u4e49\u5e8f\u5217\u66ff\u6362\u3002<\/li>\n<\/ul>\n<p>Lone surrogates\u8865\u5145\u8bf4\u660e\uff1a<\/p>\n<blockquote><p>\u5728\u8ba1\u7b97\u673a\u5b57\u7b26\u4e32\u5904\u7406\u4e2d\uff0cLone surrogates\uff08\u5b64\u7acb\u4ee3\u7406\u9879\uff09 \u662fUTF-16\u7f16\u7801\u4e2d\u51fa\u73b0\u7684\u65e0\u6548\u6216\u672a\u914d\u5bf9\u7684\u4ee3\u7406\u9879\u4ee3\u7801\u5355\u5143\uff08surrogate code units\uff09\uff0c\u5c5e\u4e8eUnicode\u6807\u51c6\u4e2d\u7684\u5f02\u5e38\u60c5\u51b5\u3002<\/p>\n<p>JS\u4e2d2024\u5e74\u65b0\u589e\u7684isWellFormed()\u548ctoWellFormed()\u5c31\u662f\u7528\u6765\u68c0\u6d4b\u548c\u5904\u7406\u8fd9\u7c7b\u5b57\u7b26\u7684\u3002<\/p><\/blockquote>\n<p>\u4ee5\u4e0a\u5c31\u662f\u8f6c\u4e49\u89c4\u5219\u7ec6\u8282\uff0c\u5f53\u7136\uff0c\u6211\u4eec\u5e73\u65f6\u4f7f\u7528\u7684\u65f6\u5019\uff0c\u5e76\u4e0d\u9700\u8981\u4e86\u89e3\u8fd9\u4e48\u591a\u3002<\/p>\n<p>\u53ea\u9700\u8981\u77e5\u9053\uff0c\u4ee5\u540e\u4f7f\u7528 new RegExp()\u6784\u9020\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u65f6\u5019\uff0c\u91cc\u9762\u7684\u5b57\u7b26\u4e32\u90fd\u7528\u8fd9\u91cc\u7684<code>escape()<\/code>\u65b9\u6cd5\u8f6c\u4e49\u4e00\u4e0b\u5c31\u53ef\u4ee5\u3002<\/p>\n<p>\u90a3\u4e3a\u4f55\u8981\u8f6c\u4e49\u5462\uff1f\u4e0b\u9762\u901a\u8fc7\u6848\u4f8b\u6f14\u793a\u4e0b\u8f6c\u4e49\u7684\u5fc5\u8981\u6027\u3002<\/p>\n<h3>\u4e8c\u3001\u4f7f\u7528\u6848\u4f8b<\/h3>\n<p>\u6bd4\u5982\u8bf4\u6211\u6709\u4e00\u4e2aURL\u8f93\u5165\u6846\uff0c\u4f46\u662f\u8fd9\u4e2a\u8f93\u5165\u6846\u53ea\u80fd\u8f93\u5165\u767d\u540d\u5355\u57df\u540d\u7684\u5730\u5740\uff1a<\/p>\n<pre>&lt;input id=\"input\" type=\"url\" name=\"url\"&gt;<\/pre>\n<pre>const arrDomain = ['www.zhangxinxu.com', 'www.cssworld.cn', 'www.canvasapi.cn'];<\/pre>\n<p>\u5f88\u591a\u4eba\u4f1a\u60f3\u5230\u4f7f\u7528\u6b63\u5219\u5b9e\u73b0\uff0c\u4f8b\u5982\uff1a<\/p>\n<pre>const arrReg = arrDomain.map(domain => {\r\n  return new RegExp(`https?:\/\/${domain}(?=\/)?`, 'g')\r\n});\r\n\/\/ \u662f\u5426\u5339\u914d\u767d\u540d\u5355\u57df\u540d\r\nconsole.log(arrReg.some(reg => reg.test(input.value)));<\/pre>\n<p>\u5f53\u6211\u4eec\u4f7f\u7528\u57df\u540d\u8fdb\u884c\u6d4b\u8bd5\u7684\u65f6\u5019\uff0c\u4f3c\u4e4e\u903b\u8f91\u90fdOK\uff0c\u4f46\u5b9e\u9645\u4e0a\u662f\u6709\u6f0f\u6d1e\u7684\uff0c\u57df\u540d\u4e2d\u7684\u5b57\u7b26&#8217;.&#8217;\u88ab\u5f53\u505a\u4efb\u610f\u5b57\u7b26\u89e3\u6790\u4e86\uff0c\u56e0\u6b64\uff0c\u5982\u679c\u7528\u6237\u8f93\u5165\u7684value\u503c\u662f<code>https:\/\/www-zhangxinxu.com<\/code>\u4e5f\u4f1a\u5339\u914d\uff1a<\/p>\n<pre>const arrDomain = ['www.zhangxinxu.com', 'www.cssworld.cn', 'www.canvasapi.cn'];\r\n\r\nconst arrReg = arrDomain.map(domain => {\r\n  return new RegExp(`https?:\/\/${domain}(?=\/)?`, 'g')\r\n});\r\n\r\n\/\/ \u4e0b\u9762\u8fd4\u56de\u7684\u662ftrue\r\nconsole.log(arrReg.some(reg => reg.test('https:\/\/www-zhangxinxu.com')));\r\n<\/pre>\n<p>\u6240\u4ee5\uff0c\u9700\u8981\u6211\u4eec\u5bf9\u7279\u6b8a\u5b57\u7b26\u8fdb\u884c\u8f6c\u4e49\uff0c\u8fd9\u5c31\u9700\u8981\u7528\u5230\u672c\u6587\u7684<code>RegExp.escape()<\/code>\u9759\u6001\u65b9\u6cd5\u4e86\u3002<\/p>\n<p>\u4f7f\u7528\u793a\u610f\uff1a<\/p>\n<pre>const arrDomain = ['www.zhangxinxu.com', 'www.cssworld.cn', 'www.canvasapi.cn'];\r\n\r\nconst arrReg = arrDomain.map(domain => {\r\n  return new RegExp(`https?:\/\/${RegExp.escape(domain)}(?=\/)?`, 'g')\r\n});\r\n\r\n\/\/ \u4e0b\u9762\u8fd4\u56de\u7684\u662ffalse\r\nconsole.log(arrReg.some(reg => reg.test('https:\/\/www-zhangxinxu.com')));\r\n<\/pre>\n<p>\u5c31\u4e0d\u4f1a\u6709\u5b89\u5168\u95ee\u9898\u4e86\u3002<\/p>\n<p>\u5f53\u7136\uff0c\u6211\u4eec\u53ea\u662f\u4e3a\u4e86\u5b9e\u73b0\u4e0a\u8ff0\u9700\u6c42\uff0c\u8fd8\u6709\u66f4\u597d\u7684\u505a\u6cd5\uff1a<\/p>\n<pre>arrDomain.includes(new URL(input.value).hostname);<\/pre>\n<p>\u4e0d\u8fc7\uff0c<code>new URL()<\/code>\u89e3\u6790\u662f\u6709\u53ef\u80fd\u4f1a\u62a5\u9519\u7684\u3002<\/p>\n<p>\u6b64\u65f6\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u6d4f\u89c8\u5668\u539f\u751f\u7684\u9a8c\u8bc1\u80fd\u529b\u8fdb\u884c\u5904\u7406\uff0c\u5982\u4e0b\uff1a<\/p>\n<pre>if (input.validity.valid) {\r\n  console.log(arrDomain.includes(new URL(input.value).hostname));\r\n} else {\r\n  console.log(false);\r\n}<\/pre>\n<p>Node\u73af\u5883\u4e0a\u9762\u7684\u65b9\u6cd5\u5c31\u4e0d\u9002\u5408\u5566\uff01<\/p>\n<h3>\u4e09\u3001\u7ed3\u8bed<\/h3>\n<p>\u9644\u4e0a\u4f20\u7edf\u8f6c\u4e49\u8fc7\u6ee4\u5904\u7406\u793a\u610f\uff1a<\/p>\n<pre>function escapeRegExp(str) {\r\n  return str.replace(\/[.*+?^${}()|[\\]\\\\]\/g, '\\\\$&');\r\n  \/\/ $&\u8868\u793a\u5339\u914d\u7684\u5b50\u4e32\r\n}<\/pre>\n<p>\u6700\u540e\u603b\u7ed3\u4e0b\uff1a<\/p>\n<p>RegExp.escape\u662f\u4e00\u4e2a\u6781\u5176\u6709\u7528\u7684\u5de5\u5177\uff0c\u7528\u4e8e\u5b89\u5168\u5730\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6b63\u5219\u8868\u8fbe\u5f0f\u5b57\u9762\u91cf\u3002\u5b83\u901a\u8fc7\u8f6c\u4e49\u6240\u6709\u7279\u6b8a\u5b57\u7b26\uff0c\u9632\u6b62\u4e86\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u610f\u5916\u884c\u4e3a\u548c\u5b89\u5168\u95ee\u9898\u3002<\/p>\n<p>\u5728\u5904\u7406\u7528\u6237\u8f93\u5165\u6216\u52a8\u6001\u6784\u5efa\u6b63\u5219\u8868\u8fbe\u5f0f\u65f6\uff0c\u4f7f\u7528RegExp.escape\u662f\u4e00\u79cd\u5b89\u5168\u53ef\u9760\u7684\u6700\u4f73\u5b9e\u8df5\u3002<\/p>\n<p>\u5bf9\u4e8e\u9700\u8981\u66f4\u9ad8\u5b89\u5168\u6027\u7684\u5e94\u7528\u573a\u666f\uff0c\u5efa\u8bae\u7ed3\u5408\u5176\u4ed6\u8f93\u5165\u9a8c\u8bc1\u548c\u6e05\u7406\u6280\u672f\uff0c\u6784\u5efa\u591a\u5c42\u6b21\u7684\u9632\u5fa1\u7b56\u7565\u3002<\/p>\n<p>\u597d\u4e86\uff0c\u4ee5\u4e0a\u5c31\u662f\u672c\u6587\u7684\u5168\u90e8\u5185\u5bb9\u3002<\/p>\n<p>\u6211\u5bb6\u5b8b\u7389\u957f\u8001\u5e0c\u671b\u4f60\u53ef\u4ee5\u8f6c\u53d1\u6b64\u6587\uff01<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202507\/2025-7-16_152405.jpeg\" width=\"189\" height=\"107\" alt=\"\u5b8b\u7389\u957f\u8001\" class=\"alignnone size-medium\" \/><\/p>\n<p>\ud83d\ude09\ud83d\ude0a\ud83d\ude07<br \/>\n\ud83e\udd70\ud83d\ude0d\ud83d\ude18<\/p>\n<p>\u672c\u6587\u4e3a\u539f\u521b\u6587\u7ae0\uff0c\u4f1a\u7ecf\u5e38\u66f4\u65b0\u77e5\u8bc6\u70b9\u4ee5\u53ca\u4fee\u6b63\u4e00\u4e9b\u9519\u8bef\uff0c\u56e0\u6b64\u8f6c\u8f7d\u8bf7\u4fdd\u7559\u539f\u51fa\u5904\uff0c\u65b9\u4fbf\u6eaf\u6e90\uff0c\u907f\u514d\u9648\u65e7\u9519\u8bef\u77e5\u8bc6\u7684\u8bef\u5bfc\uff0c\u540c\u65f6\u6709\u66f4\u597d\u7684\u9605\u8bfb\u4f53\u9a8c\u3002<br \/>\n\u672c\u6587\u5730\u5740\uff1a<a href=\"https:\/\/www.zhangxinxu.com\/wordpress\/?p=11765\">https:\/\/www.zhangxinxu.com\/wordpress\/?p=11765<\/a><\/p>\n<p>\uff08\u672c\u7bc7\u5b8c\uff09<\/p>\n","protected":false},"excerpt":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/image.zhangxinxu.com\/image\/blog\/202507\/2025-7-16_153015.png\" width=\"160\" height=\"106\" alt=\"RegExp.escape\u9759\u6001\u51fd\u6570\" class=\"alignright size-medium\" loading=\"lazy\" \/><\/p>\n<p>RegExp.escape()\u662f\u6240\u6709\u524d\u7aef\u90fd\u8981\u719f\u77e5\u7684\u9759\u6001\u51fd\u6570\uff0c\u7528\u4e8e\u5b89\u5168\u5730\u5c06\u5b57\u7b26\u4e32\u8f6c\u6362\u4e3a\u6b63\u5219\u8868\u8fbe\u5f0f\u5b57\u9762\u91cf\uff0c\u76ee\u524d\u6240\u6709\u73b0\u4ee3\u6d4f\u89c8\u5668\u90fd\u5df2\u7ecf\u652f\u6301\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1284],"tags":[1828,446,1470,216,370,222],"_links":{"self":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11765"}],"collection":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/comments?post=11765"}],"version-history":[{"count":6,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11765\/revisions"}],"predecessor-version":[{"id":11787,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/posts\/11765\/revisions\/11787"}],"wp:attachment":[{"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/media?parent=11765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/categories?post=11765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zhangxinxu.com\/wordpress\/wp-json\/wp\/v2\/tags?post=11765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}