【发布时间】:2013-06-04 03:33:44
【问题描述】:
您好,我是正则表达式的新手,我正在尝试使用它来捕获垃圾中的空格 \s{2,},但 不 包括 "url":"https://x.com/a/C25/XPS - Connection - May 2013.docx" 中的空格。目前,我有一个 url 尚未编码的场景,因此它可能包含空格。
示例文本:
"startofjunk junkjunkjunkjunk","url":"https://x.com/a/C25/XPS - Connection - May 2013.docx","contentsource":"AX","returpath":null,"detailpath":"https://ax.sample.com/Rep>ositories/form.aspx?path=C25/96/99&mode=Read","detailspath2":"samplepath"
所需文字:
"startofjunk junkjunkjunkjunk","url":"https://x.com/a/C25/XPS - Connection - May 2013.docx","contentsource":"AX","returpath":null,"detailpath":"https://ax.sample.com/Rep>ositories/form.aspx?path=C25/96/99&mode=Read","detailspath2":"samplepath"
请帮忙。谢谢
【问题讨论】: