擅长:python、mysql、java
<p>您有机会查看python文档吗?
你需要知道:</p>
<blockquote>
<p>'*' Causes the resulting RE to match 0 or more repetitions of the
preceding RE, as many repetitions as are possible. ab* will match ‘a’,
‘ab’, or ‘a’ followed by any number of ‘b’s.</p>
<p>'?' Causes the resulting RE to match 0 or 1 repetitions of the
preceding RE. ab? will match either ‘a’ or ‘ab’.</p>
<p>'\' Either escapes special characters (permitting you to match
characters like '*', '?', and so forth), or signals a special
sequence. so to check '\' you need to put it as '\'. For example, to
match a literal backslash, one might have to write '\\' as the
pattern string, because the regular expression must be \, and each
backslash must be expressed as \ inside a regular Python string
literal.</p>
</blockquote>
<p>如果您需要知道如何在python中使用regex:
<a href="https://stackoverflow.com/questions/16720541/python-string-replace-regular-expression">Python string.replace regular expression</a></p>