nodes="134" listOrderType="1" imageWidth="98"
nodes="0" listOrderType="1" 
nodes="25" imageWidth="98"替换后的效果 nodes="0" listOrderType="1" imageWidth="98"
nodes="0" listOrderType="1" 
nodes="0" imageWidth="98"
就是把 nodes="" 之间的替换掉

解决方案 »

  1.   

    str.replace(/(nodes="").*?("")/g,"$10$2")
      

  2.   

    如果lz要的是替换后的结果的话,我倒是有个方法,不过需要借助于ultraEdit工具
    拷贝替换的全部内容到ue中,在column mode(列模式)快捷键 (alter+c)下即可多行操作。
    全部替换
    nodes="134" listOrderType="1" imageWidth="98" 
    nodes="0" listOrderType="1" 
    nodes="25" imageWidth="98" nodes="" listOrderType="1" imageWidth="98" 
    nodes=""listOrderType="1" 
    nodes="" imageWidth="98" lz可以试用下。