如何用正则表达式删除引号之间的空格

问题描述 投票:0回答:1

我在这里有一些文字:

... che si concluse con la“ desegregazione” degli autobus。

我可以用什么[[正则表达式来抓住这些空间并将其转换为:

... che si concluse con la“ desegregazione” degli autobus。?

我在想类似(?<= \“。{1,20})\”之类的东西(很抱歉,如果它很笨重,我是一个初学者),但是显然Regex不接受lookbehinds内部的量词,所以我茫然。
regex regex-lookarounds lookbehind
1个回答
0
投票
您可以使用

"\s*([^"]*?)\s*"

替换为"$1"

请参见regex demo

© www.soinside.com 2019 - 2024. All rights reserved.