擅长:python、mysql、java
<p>如果您不知道这个数字,但知道它后面跟着一个<code>,</code></p>
<pre><code>import re
re.sub("\d+(?=,)","20",s) # one or more digits followed by a ,
hello number 20, Agosto 19
import re
re.sub("(\d+)","20",s,1) # first occurrence
hello number 20, Agosto 19
</code></pre>