擅长:python、mysql、java
<p>虽然它不能真正回答您的问题,但您可以使用不同的正则表达式:</p>
<pre><code>listRegex = re.findall(r'\*\[\[.*', testString)
</code></pre>
<p>或者您可以阻止任何regex高亮显示:</p>
^{pr2}$
<hr/>
<h3>适当的解决方案</h3>
<p>在第266行的<code>.../Packages/Python/Regular Expressions (Python).tmLanguage</code>中添加以下内容(第一个和第三个块是上下文):</p>
<pre class="lang-none prettyprint-override"><code><key>name</key>
<string>constant.other.character-class.set.regexp</string>
<key>patterns</key>
<array>
</code></pre>
<pre class="lang-xml prettyprint-override"><code> <dict>
<key>match</key>
<string>\[</string>
</dict>
</code></pre>
<pre class="lang-none prettyprint-override"><code> <dict>
<key>include</key>
<string>#character-class</string>
</dict>
</code></pre>