{"id":1011420,"date":"2024-12-27T11:29:45","date_gmt":"2024-12-27T03:29:45","guid":{"rendered":"https:\/\/docs.pingcode.com\/ask\/ask-ask\/1011420.html"},"modified":"2024-12-27T11:29:47","modified_gmt":"2024-12-27T03:29:47","slug":"python%e5%a6%82%e4%bd%95%e5%ae%9e%e7%8e%b0%e5%ad%97%e7%ac%a6%e5%8c%b9%e9%85%8d","status":"publish","type":"post","link":"https:\/\/docs.pingcode.com\/ask\/1011420.html","title":{"rendered":"python\u5982\u4f55\u5b9e\u73b0\u5b57\u7b26\u5339\u914d"},"content":{"rendered":"<p style=\"text-align:center;\" ><img decoding=\"async\" src=\"https:\/\/cdn-kb.worktile.com\/kb\/wp-content\/uploads\/2024\/04\/25085550\/b9c4ec6f-e3cb-4711-a144-55f895cf64c6.webp\" alt=\"python\u5982\u4f55\u5b9e\u73b0\u5b57\u7b26\u5339\u914d\" \/><\/p>\n<p><p> <strong>Python\u5b9e\u73b0\u5b57\u7b26\u5339\u914d\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u548c\u7b2c\u4e09\u65b9\u5e93\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u529f\u80fd\u5f3a\u5927\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u7b80\u5355\u6613\u7528\u3001\u7b2c\u4e09\u65b9\u5e93\u9002\u5408\u590d\u6742\u9700\u6c42\u3002<\/strong>\u5728\u8fd9\u91cc\uff0c\u6211\u4eec\u5c06\u8be6\u7ec6\u63a2\u8ba8\u5982\u4f55\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u8fdb\u884c\u5b57\u7b26\u5339\u914d\uff0c\u56e0\u4e3a\u5b83\u5728\u5904\u7406\u590d\u6742\u7684\u5b57\u7b26\u5339\u914d\u4efb\u52a1\u65f6\u975e\u5e38\u5f3a\u5927\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u901a\u8fc7\u5b9a\u4e49\u7279\u5b9a\u7684\u6a21\u5f0f\uff0c\u53ef\u4ee5\u5feb\u901f\u5339\u914d\u3001\u641c\u7d22\u548c\u66ff\u6362\u5b57\u7b26\u4e32\u4e2d\u7684\u7279\u5b9a\u5b57\u7b26\u5e8f\u5217\u3002<\/p>\n<\/p>\n<p><p>\u4e00\u3001\u6b63\u5219\u8868\u8fbe\u5f0f<\/p>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\uff08Regular Expression\uff0c\u7b80\u79f0regex\uff09\u662f\u4e00\u4e2a\u7279\u6b8a\u7684\u5b57\u7b26\u5e8f\u5217\uff0c\u7528\u4e8e\u63cf\u8ff0\u4e00\u4e2a\u641c\u7d22\u6a21\u5f0f\u3002Python\u63d0\u4f9b\u4e86<code>re<\/code>\u6a21\u5757\u6765\u652f\u6301\u6b63\u5219\u8868\u8fbe\u5f0f\u64cd\u4f5c\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u57fa\u672c\u5339\u914d<\/strong><\/p>\n<\/p>\n<p><p>\u5728Python\u4e2d\uff0c\u6b63\u5219\u8868\u8fbe\u5f0f\u53ef\u4ee5\u901a\u8fc7<code>re.match()<\/code>\u3001<code>re.search()<\/code>\u548c<code>re.findall()<\/code>\u7b49\u51fd\u6570\u6765\u5b9e\u73b0\u5b57\u7b26\u5339\u914d\u3002<\/p>\n<\/p>\n<ul>\n<li><code>re.match()<\/code>\uff1a\u7528\u4e8e\u5728\u5b57\u7b26\u4e32\u7684\u5f00\u5934\u8fdb\u884c\u5339\u914d\u3002<\/li>\n<li><code>re.search()<\/code>\uff1a\u7528\u4e8e\u5728\u6574\u4e2a\u5b57\u7b26\u4e32\u4e2d\u641c\u7d22\u7b2c\u4e00\u4e2a\u5339\u914d\u7684\u9879\u3002<\/li>\n<li><code>re.findall()<\/code>\uff1a\u7528\u4e8e\u5728\u5b57\u7b26\u4e32\u4e2d\u67e5\u627e\u6240\u6709\u5339\u914d\u9879\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\">import re<\/p>\n<p>text = &quot;Hello, world!&quot;<\/p>\n<p>pattern = r&quot;world&quot;<\/p>\n<h2><strong>\u4f7f\u7528match<\/strong><\/h2>\n<p>match = re.match(pattern, text)<\/p>\n<p>print(match)  # \u8f93\u51fa\uff1aNone\uff0c\u56e0\u4e3amatch\u4ece\u5f00\u5934\u8fdb\u884c\u5339\u914d<\/p>\n<h2><strong>\u4f7f\u7528search<\/strong><\/h2>\n<p>search = re.search(pattern, text)<\/p>\n<p>print(search)  # \u8f93\u51fa\uff1a&lt;re.Match object; span=(7, 12), match=&#39;world&#39;&gt;<\/p>\n<h2><strong>\u4f7f\u7528findall<\/strong><\/h2>\n<p>findall = re.findall(pattern, text)<\/p>\n<p>print(findall)  # \u8f93\u51fa\uff1a[&#39;world&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u7279\u6b8a\u5b57\u7b26\u548c\u8f6c\u4e49<\/strong><\/p>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u4f7f\u7528\u8bb8\u591a\u7279\u6b8a\u5b57\u7b26\u6765\u5b9a\u4e49\u5339\u914d\u6a21\u5f0f\u3002\u5982\u679c\u60f3\u5339\u914d\u8fd9\u4e9b\u7279\u6b8a\u5b57\u7b26\u672c\u8eab\uff0c\u9700\u8981\u8fdb\u884c\u8f6c\u4e49\u3002<\/p>\n<\/p>\n<ul>\n<li><code>.<\/code>\uff1a\u5339\u914d\u9664\u6362\u884c\u7b26\u5916\u7684\u4efb\u4f55\u5b57\u7b26\u3002<\/li>\n<li><code>^<\/code>\uff1a\u5339\u914d\u5b57\u7b26\u4e32\u7684\u5f00\u5934\u3002<\/li>\n<li><code>$<\/code>\uff1a\u5339\u914d\u5b57\u7b26\u4e32\u7684\u7ed3\u5c3e\u3002<\/li>\n<li><code>*<\/code>\uff1a\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u96f6\u6b21\u6216\u591a\u6b21\u3002<\/li>\n<li><code>+<\/code>\uff1a\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u4e00\u6b21\u6216\u591a\u6b21\u3002<\/li>\n<li><code>?<\/code>\uff1a\u5339\u914d\u524d\u9762\u7684\u5b57\u7b26\u96f6\u6b21\u6216\u4e00\u6b21\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\">pattern = r&quot;\\.&quot;<\/p>\n<p>text = &quot;file.txt&quot;<\/p>\n<p>match = re.search(pattern, text)<\/p>\n<p>print(match)  # \u8f93\u51fa\uff1a&lt;re.Match object; span=(4, 5), match=&#39;.&#39;&gt;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u5b57\u7b26\u96c6\u548c\u5206\u7ec4<\/strong><\/p>\n<\/p>\n<p><p>\u5b57\u7b26\u96c6\u4f7f\u7528\u65b9\u62ec\u53f7<code>[]<\/code>\u5b9a\u4e49\uff0c\u53ef\u4ee5\u5339\u914d\u65b9\u62ec\u53f7\u5185\u7684\u4efb\u610f\u4e00\u4e2a\u5b57\u7b26\u3002\u5206\u7ec4\u4f7f\u7528\u5c0f\u62ec\u53f7<code>()<\/code>\u5b9a\u4e49\uff0c\u53ef\u4ee5\u6355\u83b7\u5339\u914d\u7684\u5b50\u4e32\u3002<\/p>\n<\/p>\n<ul>\n<li><code>[abc]<\/code>\uff1a\u5339\u914d<code>a<\/code>\u3001<code>b<\/code>\u6216<code>c<\/code>\u3002<\/li>\n<li><code>(abc)<\/code>\uff1a\u5339\u914d<code>abc<\/code>\u5e76\u6355\u83b7\u5339\u914d\u7684\u5b50\u4e32\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\">pattern = r&quot;[aeiou]&quot;<\/p>\n<p>text = &quot;hello&quot;<\/p>\n<p>vowels = re.findall(pattern, text)<\/p>\n<p>print(vowels)  # \u8f93\u51fa\uff1a[&#39;e&#39;, &#39;o&#39;]<\/p>\n<p>pattern = r&quot;(hello)&quot;<\/p>\n<p>match = re.match(pattern, text)<\/p>\n<p>print(match.group(1))  # \u8f93\u51fa\uff1a&#39;hello&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u8d2a\u5a6a\u4e0e\u975e\u8d2a\u5a6a\u5339\u914d<\/strong><\/p>\n<\/p>\n<p><p>\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u5339\u914d\u9ed8\u8ba4\u662f\u8d2a\u5a6a\u7684\uff0c\u5373\u5c3d\u53ef\u80fd\u591a\u5730\u5339\u914d\u5b57\u7b26\u3002\u901a\u8fc7\u5728\u91cf\u8bcd\u540e\u52a0<code>?<\/code>\uff0c\u53ef\u4ee5\u5c06\u5176\u8f6c\u6362\u4e3a\u975e\u8d2a\u5a6a\u6a21\u5f0f\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">pattern = r&quot;&lt;.*?&gt;&quot;<\/p>\n<p>text = &quot;&lt;div&gt;Content&lt;\/div&gt;&quot;<\/p>\n<p>non_greedy_match = re.findall(pattern, text)<\/p>\n<p>print(non_greedy_match)  # \u8f93\u51fa\uff1a[&#39;&lt;div&gt;&#39;, &#39;&lt;\/div&gt;&#39;]<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e8c\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5<\/p>\n<\/p>\n<p><p>Python\u7684\u5b57\u7b26\u4e32\u5bf9\u8c61\u4e5f\u63d0\u4f9b\u4e86\u4e00\u4e9b\u57fa\u672c\u7684\u5b57\u7b26\u5339\u914d\u65b9\u6cd5\uff0c\u4f8b\u5982<code>str.find()<\/code>\u3001<code>str.startswith()<\/code>\u548c<code>str.endswith()<\/code>\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>str.find()<\/strong><\/p>\n<\/p>\n<p><p><code>str.find(sub[, start[, end]])<\/code>\u7528\u4e8e\u5728\u5b57\u7b26\u4e32\u4e2d\u67e5\u627e\u5b50\u4e32<code>sub<\/code>\u7684\u4f4d\u7f6e\u3002\u5982\u679c\u627e\u5230\uff0c\u8fd4\u56de\u5b50\u4e32\u7684\u7b2c\u4e00\u4e2a\u5b57\u7b26\u7684\u7d22\u5f15\uff1b\u5426\u5219\uff0c\u8fd4\u56de-1\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">text = &quot;Hello, world!&quot;<\/p>\n<p>index = text.find(&quot;world&quot;)<\/p>\n<p>print(index)  # \u8f93\u51fa\uff1a7<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>str.startswith()\u548cstr.endswith()<\/strong><\/p>\n<\/p>\n<ul>\n<li><code>str.startswith(prefix[, start[, end]])<\/code>\uff1a\u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u6307\u5b9a\u7684\u524d\u7f00\u5f00\u59cb\u3002<\/li>\n<li><code>str.endswith(suffix[, start[, end]])<\/code>\uff1a\u68c0\u67e5\u5b57\u7b26\u4e32\u662f\u5426\u4ee5\u6307\u5b9a\u7684\u540e\u7f00\u7ed3\u675f\u3002<\/li>\n<\/ul>\n<p><pre><code class=\"language-python\">text = &quot;Hello, world!&quot;<\/p>\n<p>starts_with_hello = text.startswith(&quot;Hello&quot;)<\/p>\n<p>print(starts_with_hello)  # \u8f93\u51fa\uff1aTrue<\/p>\n<p>ends_with_exclamation = text.endswith(&quot;!&quot;)<\/p>\n<p>print(ends_with_exclamation)  # \u8f93\u51fa\uff1aTrue<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u4e09\u3001\u7b2c\u4e09\u65b9\u5e93<\/p>\n<\/p>\n<p><p>\u5bf9\u4e8e\u590d\u6742\u7684\u5b57\u7b26\u5339\u914d\u4efb\u52a1\uff0c\u6709\u65f6\u53ef\u4ee5\u501f\u52a9\u7b2c\u4e09\u65b9\u5e93\uff0c\u5982<code>regex<\/code>\u5e93\uff0c\u5b83\u662fPython\u6807\u51c6\u5e93<code>re<\/code>\u6a21\u5757\u7684\u589e\u5f3a\u7248\uff0c\u63d0\u4f9b\u4e86\u66f4\u591a\u529f\u80fd\u3002<\/p>\n<\/p>\n<ol>\n<li>\n<p><strong>\u5b89\u88c5regex\u5e93<\/strong><\/p>\n<\/p>\n<p><p>\u53ef\u4ee5\u4f7f\u7528<code>pip<\/code>\u5b89\u88c5<code>regex<\/code>\u5e93\uff1a<\/p>\n<\/p>\n<p><pre><code class=\"language-bash\">pip install regex<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<li>\n<p><strong>\u4f7f\u7528regex\u5e93<\/strong><\/p>\n<\/p>\n<p><p><code>regex<\/code>\u5e93\u4e0e<code>re<\/code>\u6a21\u5757\u7684\u4f7f\u7528\u65b9\u6cd5\u7c7b\u4f3c\uff0c\u4f46\u63d0\u4f9b\u4e86\u66f4\u5f3a\u5927\u7684\u529f\u80fd\uff0c\u6bd4\u5982\u652f\u6301\u66f4\u590d\u6742\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u6a21\u5f0f\u548c\u6539\u8fdb\u7684\u5339\u914d\u6027\u80fd\u3002<\/p>\n<\/p>\n<p><pre><code class=\"language-python\">import regex as re<\/p>\n<p>text = &quot;Hello, \u4e16\u754c!&quot;<\/p>\n<p>pattern = r&quot;\\p{Han}+&quot;<\/p>\n<p>match = re.search(pattern, text)<\/p>\n<p>print(match.group())  # \u8f93\u51fa\uff1a&#39;\u4e16\u754c&#39;<\/p>\n<p><\/code><\/pre>\n<\/p>\n<\/li>\n<\/ol>\n<p><p>\u7efc\u4e0a\u6240\u8ff0\uff0cPython\u63d0\u4f9b\u4e86\u591a\u79cd\u5b57\u7b26\u5339\u914d\u7684\u65b9\u6cd5\uff0c\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\u53d6\u51b3\u4e8e\u5177\u4f53\u7684\u5e94\u7528\u573a\u666f\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u9002\u7528\u4e8e\u590d\u6742\u7684\u5339\u914d\u9700\u6c42\uff0c\u800c\u5b57\u7b26\u4e32\u65b9\u6cd5\u5219\u66f4\u7b80\u5355\u76f4\u63a5\uff0c\u9002\u5408\u57fa\u672c\u7684\u5339\u914d\u4efb\u52a1\u3002\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u9700\u6c42\uff0c\u53ef\u4ee5\u8003\u8651\u4f7f\u7528\u7b2c\u4e09\u65b9\u5e93\u3002\u65e0\u8bba\u9009\u62e9\u54ea\u79cd\u65b9\u6cd5\uff0c\u638c\u63e1\u5b57\u7b26\u5339\u914d\u7684\u6280\u5de7\u90fd\u5c06\u6781\u5927\u5730\u63d0\u5347\u4f60\u7684\u6587\u672c\u5904\u7406\u80fd\u529b\u3002<\/p>\n<\/p>\n<h2><strong>\u76f8\u5173\u95ee\u7b54FAQs\uff1a<\/strong><\/h2>\n<p> <strong>\u5982\u4f55\u5728Python\u4e2d\u8fdb\u884c\u5b57\u7b26\u4e32\u7684\u57fa\u672c\u5339\u914d\uff1f<\/strong><br \/>\u5728Python\u4e2d\uff0c\u5b57\u7b26\u4e32\u5339\u914d\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\u5b9e\u73b0\u3002\u6700\u5e38\u89c1\u7684\u65b9\u5f0f\u662f\u4f7f\u7528<code>in<\/code>\u8fd0\u7b97\u7b26\u6765\u5224\u65ad\u4e00\u4e2a\u5b50\u5b57\u7b26\u4e32\u662f\u5426\u5b58\u5728\u4e8e\u53e6\u4e00\u4e2a\u5b57\u7b26\u4e32\u4e2d\u3002\u4f8b\u5982\uff0c<code>if &quot;abc&quot; in &quot;abcdef&quot;:<\/code> \u4f1a\u8fd4\u56deTrue\u3002\u8fd8\u53ef\u4ee5\u4f7f\u7528<code>str.find()<\/code>\u6216<code>str.index()<\/code>\u65b9\u6cd5\u6765\u627e\u5230\u5b50\u5b57\u7b26\u4e32\u7684\u4f4d\u7f6e\uff0c\u8fd9\u4e24\u8005\u7684\u533a\u522b\u5728\u4e8e<code>find()<\/code>\u5728\u627e\u4e0d\u5230\u65f6\u8fd4\u56de-1\uff0c\u800c<code>index()<\/code>\u4f1a\u5f15\u53d1\u5f02\u5e38\u3002<\/p>\n<p><strong>Python\u4e2d\u6709\u54ea\u4e9b\u6a21\u5757\u53ef\u4ee5\u7528\u4e8e\u590d\u6742\u7684\u5b57\u7b26\u5339\u914d\uff1f<\/strong><br \/>\u5bf9\u4e8e\u66f4\u590d\u6742\u7684\u5b57\u7b26\u5339\u914d\uff0cPython\u7684<code>re<\/code>\u6a21\u5757\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u652f\u6301\u3002\u901a\u8fc7\u4f7f\u7528<code>re.search()<\/code>\u3001<code>re.match()<\/code>\u548c<code>re.findall()<\/code>\u7b49\u51fd\u6570\uff0c\u7528\u6237\u53ef\u4ee5\u5728\u5b57\u7b26\u4e32\u4e2d\u6267\u884c\u6a21\u5f0f\u5339\u914d\u3001\u67e5\u627e\u548c\u66ff\u6362\u7b49\u64cd\u4f5c\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u7684\u7075\u6d3b\u6027\u4f7f\u5f97\u7528\u6237\u80fd\u591f\u6784\u5efa\u590d\u6742\u7684\u5339\u914d\u6761\u4ef6\uff0c\u6bd4\u5982\u5339\u914d\u7279\u5b9a\u683c\u5f0f\u7684\u7535\u5b50\u90ae\u4ef6\u5730\u5740\u6216\u7535\u8bdd\u53f7\u7801\u3002<\/p>\n<p><strong>\u5982\u4f55\u63d0\u9ad8Python\u5b57\u7b26\u5339\u914d\u7684\u6548\u7387\uff1f<\/strong><br \/>\u5728\u5904\u7406\u5927\u578b\u5b57\u7b26\u4e32\u6216\u9891\u7e41\u5339\u914d\u65f6\uff0c\u4f18\u5316\u5b57\u7b26\u5339\u914d\u7684\u6548\u7387\u975e\u5e38\u91cd\u8981\u3002\u53ef\u4ee5\u8003\u8651\u4f7f\u7528<code>re.compile()<\/code>\u9884\u7f16\u8bd1\u6b63\u5219\u8868\u8fbe\u5f0f\uff0c\u8fd9\u6837\u53ef\u4ee5\u5728\u591a\u6b21\u4f7f\u7528\u65f6\u63d0\u9ad8\u6027\u80fd\u3002\u6b64\u5916\uff0c\u5c3d\u91cf\u907f\u514d\u5728\u5faa\u73af\u4e2d\u91cd\u590d\u521b\u5efa\u76f8\u540c\u7684\u5339\u914d\u6a21\u5f0f\uff0c\u9009\u62e9\u5408\u9002\u7684\u6570\u636e\u7ed3\u6784\uff08\u5982\u96c6\u5408\u6216\u5b57\u5178\uff09\u6765\u5b58\u50a8\u4e2d\u95f4\u7ed3\u679c\u4e5f\u80fd\u5927\u5927\u63d0\u5347\u5339\u914d\u901f\u5ea6\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"Python\u5b9e\u73b0\u5b57\u7b26\u5339\u914d\u53ef\u4ee5\u901a\u8fc7\u591a\u79cd\u65b9\u6cd5\uff1a\u4f7f\u7528\u6b63\u5219\u8868\u8fbe\u5f0f\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5\u548c\u7b2c\u4e09\u65b9\u5e93\u3002\u6b63\u5219\u8868\u8fbe\u5f0f\u529f\u80fd\u5f3a\u5927\u3001\u5b57\u7b26\u4e32\u65b9\u6cd5 [&hellip;]","protected":false},"author":3,"featured_media":1011429,"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\/1011420"}],"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=1011420"}],"version-history":[{"count":"1","href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1011420\/revisions"}],"predecessor-version":[{"id":1011431,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/posts\/1011420\/revisions\/1011431"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media\/1011429"}],"wp:attachment":[{"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/media?parent=1011420"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/categories?post=1011420"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/docs.pingcode.com\/wp-json\/wp\/v2\/tags?post=1011420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}