第一次发现JavaScript中replace() 方法如果直接用str.replace("-","!") 只会替换第一个匹配的字符. 而str.replace(/\-/g,"!")则可以全部替换掉匹配的字符(g为全局标志). replace() The replace() method returns the string that results when you replace text matching its first argum
参考<Search & Replace function for LoadRunner>: http://ptfrontline.wordpress.com/2009/03/13/search-replace-function-for-lr/ LoadRunner中没有直接的函数支持查找并替换字符串,因此可以封装一个lr_replace函数出来: // -------------------------------------------------------------------