code: function replaceAssets(fileSrc) {
        //read page file data
        var htmlData = grunt.file.read(fileSrc);
        // console.log(htmlData)
  
        // var tsPrefix = 'auto_create_ts_com_';
        // var newTS = 'abc';
        // var testString = '"text/javascript" src="/js_build/app.auto_create_ts_com_1415079600.js"';
        // re1.test(testString);
        // testString.replace(re1, "$1" + newTS + "$3");
  
        var a1 = htmlData.match(re1)
        var num1 = !a1 ? 0 : a1.length
        console.log('Find ' + num1 + ' js ts string.')
  
        var a2 = htmlData.match(re2)
        var num2 = !a2 ? 0 : a2.length
        console.log('Find ' + num2 + ' css ts string.')
  
        if(num1 || num2) {
  
          var newdata = htmlData.replace(re1, "$1" + newTS + "$3");
          newdata = newdata.replace(re2, "$1" + newTS + "$3");
  
          if (grunt.file.write(fileSrc, newdata)) {
            grunt.log.success(fileSrc + ' replace ts successfully');
          } else {
            grunt.log.error(fileSrc + ' replace ts failed');
          }
        }
        else
          grunt.log.error('Can not find ts string in file: ' + fileSrc)
  
      }
docs: console.log(re1) console.log(re2)