擅长:python、mysql、java
<p>您可以这样使用正则表达式:</p>
<pre><code>\B%\w+(?=\s|$)
</code></pre>
<p><strong><a href="https://regex101.com/r/Qgx3ic/1" rel="nofollow noreferrer">Working demo</a></strong></p>
<p><a href="https://i.stack.imgur.com/2GEUw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2GEUw.png" alt="enter image description here"/></a></p>