我有以下字符串,我只想提取“我的重要文本”。
cssbody=[short_bdy] cssheader=[short_hdr] body=[My Important Text] offsetx=[10] offsety=[20] delay=[300]发布于 2019-09-24 03:01:57
我们可以尝试在模式中使用re.findall:
\bbody=\[(.*?)\]剧本:
inp = "cssbody=[short_bdy] cssheader=[short_hdr] body=[My Important Text] offsetx=[10] offsety=[20] delay=[300]"
matches = re.findall(r'\bbody=\[(.*?)\]', inp)
print(matches[0])这些指纹:
My Important Texthttps://stackoverflow.com/questions/58072493
复制相似问题