请教 python 一个正则表达式 的写法
字符串 "this is a test for ffesdd"
我想提取 "a tes"
我的正则表达式为"a.*es", 然后用re.search(),却发现结果为"a test for ffes".
请问该如何解决。
[解决办法]
- Python code
a.*?es
发布时间: 2012-02-03 22:02:47 作者: rapoo
请教 python 一个正则表达式 的写法
字符串 "this is a test for ffesdd"
我想提取 "a tes"
我的正则表达式为"a.*es", 然后用re.search(),却发现结果为"a test for ffes".
请问该如何解决。
[解决办法]
a.*?es