鉴于此输入:
"hell -- 'this -- world --is'-- beautiful' --thanks-- we'-- are-- here"
Run Code Online (Sandbox Code Playgroud)
我想用 'XXX' 替换单引号之间的每个 '--' 使用sed. 它应该提供以下输出:
输出:“地狱——'这个 XXX 世界 XX-Xis'--美丽的 XX-Xthanks XXX 我们'——在这里”
替换次数可能未知(最多无穷大)。
sed ×1