Posted on 2008-05-08 12:50
罗明 阅读(152)
评论(0) 编辑 收藏 所属分类:
Study 、
Python
从一大堆字母里找出两边都刚好有3个大写字母的小写字母
详细描述:
http://www.pythonchallenge.com/pc/def/equality.html
解决方案:
Python:
>>> import re
>>> re.findall(r'[a-z][A-Z][A-Z][A-Z][a-z][A-Z][A-Z][A-Z][a-z]', text)
版权所有 罗明