Lerry·me
Tags/Archive/About

March

2026

LatestPopularTechTravel

Articles

116

Total reads

426K

Records of technology,
travel & everyday
observations.

Latest/Popular/Tech/Travel
← All

Articles

116

Total reads

426K

Records of technology, travel and everyday observations.

字符串← All
1

让python的字符串支持“findall”

最近在写程序时,出现了这样一个需求,查找出字符串中所有指定的关键词,str.find()只能找到一个,我想着标准库中应该有findall之类的函数吧,结果没找到,于是自己实现了一个,代码如下: 使用很简单

28 May 2012·2,968 reads

→

© 2026 Lerry's Blog

Designed by Claude Sonnet 4.6

RSS