惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
Recent Announcements
Recent Announcements
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The GitHub Blog
The GitHub Blog
MyScale Blog
MyScale Blog
爱范儿
爱范儿
GbyAI
GbyAI
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
美团技术团队
Y
Y Combinator Blog
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
Martin Fowler
Martin Fowler
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
罗磊的独立博客
M
MIT News - Artificial intelligence
博客园 - Franky
V
Visual Studio Blog
I
InfoQ
V
V2EX
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
博客园 - 司徒正美
L
LangChain Blog

博客园 - 电电儿

FME Cloud 账号申请流程 FME中通过HTMLExtractor向HTML要数据 在windows 2003下安装 django + apache + mod_python arcgis中坐标系统的简单描述 arcgis 中利用txt坐标文件创建要素的办法,含txt文件详细格式~ Django静态文件配置备忘录 【转】ARCSDE+ORACLE备份 测量坐标系中单个多边形面积解析法计算的程序源代码 - 电电儿 - 博客园 测试oracle with as System.Data.SQLite测试 oracle左右连接的另外表示方法 Oracle 函数大全(字符串函数,数学函数,日期函数,逻辑运算函数,其他函数) Oracle中的Union、Union All、Intersect、Minus inner join,full outer join,left join,right join,cross join Oracle中的自连接(self join) Oracle 中的natural join (自然连接) ORACLE JOIN BoooLee pyretoolkit -- 一个基于python re模块的在线正则表达式测试工具 GDAL 在windows python环境下的安装步骤
用正则表达式分析正则表达式!求正则表达式组数~ - 电电儿 - ...
电电儿 · 2009-09-06 · via 博客园 - 电电儿

import re
r=r'(?<=charset=)(.+[[])(?P<groupname1>.*?)[s(bc)k]\("'  #待分析的正则表达式
s=re.subn(r'\[(?![?]).*?\]','',r)  #排除[]
s=re.subn(r'\\\(','',s[0])  #排除\(
s=re.subn(r'\?P<','',s[0])  #排除(?P<
l=re.findall(r'\((?!\?).*?\)',s[0])  #查找所有组
print len(l)  #打印组数

该代码已经应用于我的开源项目http://pyretoolkit.appspot.com/