web/iframe/injected-iframe.js
function findInstanceOffset(anno, text) {
    var re = new RegExp('\\b'+anno.exact+'\\b', 'g'), cur = 1, match;
    while ((match = re.exec(text)) !== null) {
      if (cur === anno.instance) {
        return match.index;
      }
      cur++;
    }
  }
function findInstanceOffset(anno, text) {
    var re = new RegExp('\\b'+anno.exact+'\\b', 'g'), cur = 1, match;
    while ((match = re.exec(text)) !== null) {
      if (cur === anno.instance) {
        return match.index;
      }
      cur++;
    }
  }
function findInstanceOffset ( anno , text ) { var re = new RegExp ( '\\b' + anno . exact + '\\b' , 'g' ) , cur = 1 , match ; while ( ( match = re . exec ( text ) ) !== null ) { if ( cur === anno . instance ) { return match . index ; } cur ++ ; } }
find the starting position of an instance
find the starting position of an instance