我想将正则表达式值中的逗号转换为代字号
我必须从以下jquery响应中提取rowversion值
7({"d":{"results":[{"RequestQuoteId":1043,"RowVersion":[0,0,0,0,0,2,39,50],"TenantId"
我使用了正则表达式:
"RowVersion":\[(.+?)\] and got value 0,0,0,0,0,2,39,50
现在我必须在下一个请求中将值0,0,0,0,0,2,39,50
作为0~0~0~0~0~2~39~50
传递
如何通过正则表达式将(逗号)转换为〜(代字号)符号
有没有出路
答案 0 :(得分:0)
var res = str.replace(/,/g,"~");
这应该这样做。