嗨内部空间我是新来的正则表达式,我试图用这个来追赶空间的垃圾\s{2,}
但不包括"url":"https://x.com/a/C25/XPS - Connection - May 2013.docx"
内的空间。目前,我有一个场景,url尚未编码,因此它可能包含空格。正则表达式匹配的空间,除了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"
请帮助。由于
嗨@Denomales谢谢!我们应该添加什么来修改匹配空间到单个空间?像这样:“startofjunk junkjunkjunkjunk” – user2450064
我刚更新了这个以满足单个空间的需求。 –