/+(?=([^"\\]*(\\.|"([^"\\]*\\.)*[^"\\]*"))*[^"]*$)/g, "&&"
我使用了这个正则表达式,它用 && 替换了 + 但我如何用“&&”替换字符串行“and”
str = "Loop(this and that is "Help and enjoy")";
它应该返回:Loop(this && that is "Help and enjoy")
/+(?=([^"\\]*(\\.|"([^"\\]*\\.)*[^"\\]*"))*[^"]*$)/g, "&&"
我使用了这个正则表达式,它用 && 替换了 + 但我如何用“&&”替换字符串行“and”
str = "Loop(this and that is "Help and enjoy")";
它应该返回:Loop(this && that is "Help and enjoy")