爬蟲經常使用的正則表達方式

python裏的正則化庫re,使用方法:python import re line = 'boooooobby123' regex_str = "^b.*3$" re.match(regex_str, line) 正則化用到的特殊字符 ^ $ * ? {2} {2, } {2,5} | [] [^] [] [^] [a-z] \s \S \w \W [\u4E00-\u9FA5] () \d ^
相關文章
相關標籤/搜索