擅长:python、mysql、java
<p>幸运的是,Python内置了这个:)</p>
<pre><code>import re
re.split('; |, ',str)
</code></pre>
<p><strong>更新:</strong><br/>根据您的评论:</p>
<pre><code>>>> a='Beautiful, is; better*than\nugly'
>>> import re
>>> re.split('; |, |\*|\n',a)
['Beautiful', 'is', 'better', 'than', 'ugly']
</code></pre>