擅长:python、mysql、java
<p>我不太清楚你在问什么。我想你想问的是如何输入一个名为“keyword”的变量的值</p>
<p>你就是这样做的</p>
<pre><code>re.compile(f"(((.*\n+){{2}})\\s*{keyword}\\s*\n((.*\n+){{2}}))")
</code></pre>
<p>如果您定义keyword=<;some value>;,则上面的代码将起作用。你知道吗</p>
<p>顺便说一句,你需要使用组1时提取得到你想要的。你知道吗</p>