会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
小╭ァ哥
博客园
园子
首页
新随笔
联系
管理
订阅
2012年5月17日
Python Python 正则 取中括号值
摘要: str = '[111]dsfdsd[33333]'pattern = r"(\[.*?\])"; guid = re.findall(pattern,str ,re.M) if(len(guid)>0): guid = guid[0] guid = guid.replace('[','').replace(']','')
阅读全文
posted @ 2012-05-17 09:58 小さいです哥
阅读(8069)
评论(0)
推荐(1)
公告