code: function extract(str,path,remove) {
    var _annotation = new Annotation(str);
    str = _annotation.getString();
  
    var require;
    var requiredModules = [];
    REQUIRE_RE.lastIndex = 0;
    while(require = REQUIRE_RE.exec(str)) {
      if (require[2]) {
        requiredModules.push("'" + require[2] + "'");
      }
    }
    
    str.replace(DEFINE_RE,function (match,group1,group2,group3,index) {
      var sliceIndex;
      var newStr;
      var insertedString;
  
      // 没有提供id和依赖
      if (!group1 && !group2 && group3) {
        sliceIndex = index + match.indexOf(group3);
        insertedString = "'" + path + "'," + "[" + requiredModules.join(',') + "],";
        _annotation.insertStr(sliceIndex,insertedString);
      // 提供了依赖，但没有提供id
      } else if (group1 && !IS_ID_RE.test(group1) && group3) {
        sliceIndex = index + match.indexOf(group1);
        insertedString = "'" + path + "',";
        _annotation.insertStr(sliceIndex,insertedString);
      } else if (group1 && IS_ID_RE.test(group1) && group3) {
        sliceIndex = index + match.indexOf(group3);
        insertedString = "[" + requiredModules.join(',') + "],";
        _annotation.insertStr(sliceIndex,insertedString);
      }
  
      return match;
    });
  
    return remove ? _annotation.getString() : _annotation.recover().getString();
  }
docs: extract 提取模块路径
  @param str {string} 需要处理的字符内容
  @param path {string} 要注入的cmd模块路径