擅长:python、mysql、java
<p>匹配<code>=</code><code>nt</code>和<code>number</code>的正则表达式是:</p>
<pre><code>=(nt\d+)
</code></pre>
<p>在你的例子中:</p>
<pre><code>line = .Falies/367. 11DG1550/11DG15537.Axiom=nt60
line = .Failies/367. 11DG1550/11DG15537.Axiom=nt50
</code></pre>
<p>它将返回两个匹配项:</p>
<pre><code>MATCH 1
1. [49-53] `nt60`
MATCH 2
1. [105-109] `nt50`
</code></pre>
<p>说明:</p>
<pre><code>`=` matches the character `=` literally
1st Capturing group `(nt\d+)`
`nt` matches the characters `nt` literally (case sensitive)
`\d` match a digit `[0-9]`
`+` Quantifier: Between one and unlimited times, as many times as possible,
giving back as needed
</code></pre>
<p>如果您希望正则表达式匹配a=<code>word</code><code>number</code>,那么只需将<code>nt</code>替换为<code>\w+</code>即可匹配任何单词。你知道吗</p>
<p>希望这有帮助。你知道吗</p>