str = '[111]dsfdsd[33333]'
pattern = r"(\[.*?\])";
guid = re.findall(pattern,str ,re.M) if(len(guid)>0): guid = guid[0] guid = guid.replace('[','').replace(']','')本文共 231 字,大约阅读时间需要 1 分钟。
str = '[111]dsfdsd[33333]'
pattern = r"(\[.*?\])";
guid = re.findall(pattern,str ,re.M) if(len(guid)>0): guid = guid[0] guid = guid.replace('[','').replace(']','')转载于:https://www.cnblogs.com/xsmhero/archive/2012/05/17/2505795.html