腾讯云
开发者社区
文档
建议反馈
控制台
登录/注册
首页
学习
活动
专区
圈层
工具
MCP广场
文章/答案/技术大牛
搜索
搜索
关闭
发布
文章
问答
(9999+)
视频
沙龙
3
回答
Python
RE
"
re
,findall“
、
我的问题是:file1:192.168.3.1for subdir, dirs, files in os.walk('.'): matches =
re
.findall(r"\d{1,3为什么
re
.findall不接受
浏览 4
提问于2014-01-14
得票数 2
4
回答
按方括号之间的单词分隔字符串
、
val = "[
python
] how to [css]"val = "how to [
python
][css]"a=['
python
','css'] #(type list)我试过这个 import
re</em
浏览 5
提问于2015-01-07
得票数 1
回答已采纳
2
回答
Python
中
的
re
模块
、
我已经开始在
python
中使用
re
模块并编写小程序。得到了以下输出。我认为这是正确的替换,但我想要修改字符串以下方式。我试过了,但没有人指出我的错误或想法。str_result =//#定义芯片级设计的FULL_CHIP /*打开*/ >>> str = "#define FULL_CHIP /* Turn on for chiplevel design */" >>> str =
re</e
浏览 7
提问于2013-08-14
得票数 1
回答已采纳
4
回答
如何使用"import“语句确定在
Python
中导入哪个文件?
、
如何使用"import“语句确定在
Python
中导入哪个文件? 我想确定我加载的是本地修改过的.py文件的正确版本。基本上相当于POSIX环境
中
的“the”。
浏览 0
提问于2010-03-30
得票数 6
回答已采纳
2
回答
python
re
?:示例
、
我在
python
re
示例中看到了一个正则表达式(?= (?:\d{5}|[A-Z]{2})),并对?:的含义感到非常困惑。(?:...)匹配括号内的任何正则表达式,但在执行匹配后无法检索到组匹配的子字符串,也无法稍后在模式
中
引用它。 谁能给我举个例子,并解释为什么它是有效的,谢谢!
浏览 2
提问于2014-04-10
得票数 5
1
回答
Python
-
re
.search -
re
.compile
、
、
import urllib2opener = urllib2.build_opener(urllib2.HTTPCookieProcessor())theIP =
re
.compile(r"d{1,3}.d{1,3}.d{1,3}.d{1,3}") ip =
re
.
浏览 14
提问于2018-01-22
得票数 0
4
回答
Python
和"
re
“
、
我在
python
中有一个关于Regex的教程,它解释了如何在
python
中使用
re
模块,我想从A标签
中
抓取URL,所以知道Regex之后,我编写了正确的表达式,并在我选择的regex测试应用程序
中
对其进行了测试当把它放到
python
中
时,它失败了。regex = ".
浏览 3
提问于2008-09-16
得票数 7
回答已采纳
3
回答
python
RE
vs html5
RE
、
、
似乎我在
Python
中
遇到了一个bug:(
Python
2.7.3(默认,Apr 10 2012,23:24:47) MSC v.1500 64位(AMD64)在win32上)<_sre.SRE_Match object at 0x0000000002D3FC60> >>>
re
.match("
浏览 12
提问于2012-09-15
得票数 0
回答已采纳
4
回答
Python
re
函数
当然,肯定有一种方法可以通过
re
函数来实现这一点。非常感谢大家
浏览 0
提问于2012-08-23
得票数 0
3
回答
python
re
regex
、
{0,100}\s{0,40}$'所以我的代码是但是
Python
浏览 1
提问于2016-12-26
得票数 3
回答已采纳
2
回答
Python
:
RE
问题与"
re
.findall()“
、
、
string = "RegisterParameter uri wub {" RegisterName =
re
.findall("RegisterParameter uri ([^ ]*) {",string这里我想通过正则表达式在字符串
中
查找寄存器名称。我已经为此编写了
RE
。如果你运行这段代码,它会给出类似' wub‘的输出,但我只想要wub,而不是括号或引号。那么在这里要做什么修改。
浏览 1
提问于2014-01-16
得票数 0
1
回答
关于
python
re
但是当我使用
python
的
re
包时,结果就不同了。 pattern =
re
.compile(u'(?<=slot).*?(?
浏览 0
提问于2018-11-07
得票数 0
2
回答
python
re
问题
、
我在一些pythonwebshelll上测试
re
,它们都遇到了问题。a=
re
.findall(r"""<ul>[\s\S]*?<li><a href="(?</ul>""",html)没问题的a=
re
.findall(r"""<ul>[\s\S]*?<li><a href="(?P<link>
浏览 1
提问于2010-10-04
得票数 1
回答已采纳
1
回答
Python
2vs
Python
3Regex匹配行为
、
、
Python
3
re
.sub(P, ' ', '\xa0 haha')
Python
2
re
.sub(P, u' ', u'\xa0 haha'
浏览 2
提问于2015-01-22
得票数 1
回答已采纳
2
回答
专门化regex类型的
re
.Pattern
、
、
、
将
re
.Pattern的类型专门化为
re
.Pattern[bytes],mypy正确地检测类型错误:REGEX:
re
.Pattern[bytes] =
re
.compile(b"电文:Traceback (most recent call last): File "/home/oren/main.py", line 2, in <module&g
浏览 9
提问于2022-01-25
得票数 2
回答已采纳
1
回答
python
re
.findall和
re
.sub
、
我的代码: import
re
print(
re
.sub(r'(?=(Deportivo))(?!.*\bla\b)','','Deportivo coruna')) 如果字符串
中
没有'la‘,我有兴趣删除'Deportivo’。 例如:
re
.fin
浏览 42
提问于2021-11-05
得票数 0
回答已采纳
1
回答
与
Python
2和
Python
3
中
的Unicode字符匹配
、
Python
3>>> >>> value = "ហួយ">>>
re
.search(REGEX_KHMER, value) <_sre.SRE_Match object; sp
浏览 2
提问于2020-06-04
得票数 0
回答已采纳
2
回答
python
regex只替换不匹配的部分
、
我有许多具有<pre>
python
code </pre>的html代码,如下所示<pre class="c1">import
re
</pre> <pre class="c
浏览 8
提问于2014-10-21
得票数 0
回答已采纳
2
回答
为
Python
2和
Python
3编写unicode正则表达式
、
、
、
、
我可以使用ur'something'和
Python
2
中
的
re
.U标志编译regex模式,例如:
Python
2.7.13 (default, Dec 18 2016, 07:03:abc \xab def \xab ' « abc « def « 在
Python
3
中
,我可以避免使用
浏览 8
提问于2017-04-12
得票数 5
1
回答
re
.match不工作,抛出在
python
中
无法识别的'
re
‘错误
、
m=
re
.match('bat,'bat').group()m=
re
.search(b,'bit)所以我认为
re
模块在我的
python
版本<
浏览 5
提问于2013-10-16
得票数 0
回答已采纳
点击加载更多
相关
资讯
Python中的re模块
Python标准库-re
Python-re模块攻略
Python基础教程 re
Python之re模块方法详解
热门
标签
更多标签
云服务器
ICP备案
对象存储
云点播
实时音视频
活动推荐
运营活动
广告
关闭
领券