擅长:python、mysql、java
<p>不确定我是否正确理解了问题,但是,如果您想找到<code>Country</code>之后的下一行中的内容,应该这样做:</p>
<pre><code>import re
text = """Country
Judecatoria Sectorului X"""
result = re.search('Country\s*\n\s*(.*)\s*', text).group(1)
print(result)
</code></pre>
<p>如果<code>Country</code>只是一个示例,它可能是许多单词中的一个,请将<code>Country</code>更改为<code>(?:Country|Something else|Yet another one)</code></p>