擅长:python、mysql、java
<p>我想您正在寻找类似<strong>r“Win[^,]+x[2346][\ud]*”</strong></p>
<pre><code>txt = "Suggested Profile(s) : Win7SP1x64, Win7SP0x64, Win2008R2SP1x64, Win7SP1x64_24000, Win2008R2x32, Win7x32"
match = re.findall(r"Win[^,]+x[2346][_\d]*", txt)
</code></pre>
<p><strong>匹配变量将包含:</p>
<pre><code>['Win7SP1x64', 'Win7SP0x64', 'Win2008R2SP1x64', 'Win7SP1x64_24000', 'Win2008R2x32', 'Win7x32']
</code></pre>