日期:2014-05-16 浏览次数:20676 次
var test = "LeftMessage is null and SentEmail is null and MetWith is null and SlsmanDist like 'KEE - kevin tang"; alert(test.replace(/and SlsmanDist/g, function() { return "or SlsmanDist"; }));
------解决方案--------------------
var str="LeftMessage is null and SentEmail is null and MetWith is null and SlsmanDist like 'KEE - kevin tang%"; alert(str.replace(/and\s+(SlsmanDist)/gi,"Or $1"))
------解决方案--------------------
var str = "LeftMessage is null and SentEmail is null and MetWith is null and SlsmanDist"; alert(str.replace(/\band\b(?=\s*\bSlsmanDist\b)/img,"OR"));
------解决方案--------------------
看了上面几位,我不敢发言了...
------解决方案--------------------