services/annotators/structural.js
function(sMatch, text) {
      for (var i = 0; i < sMatch.matches.length; i++) {
        var r = sMatch.matches[i];
        var found = text.match(r);

        if (found) {
          var exact = found[0];
          var value = found[1].trim();
          var key = sMatch.fields[i];
          annoRows.push(annotations.createAnnotation({type: 'valueQuote', annotatedBy: sMatch.name, hasTarget: uri, key: key, value: value, ranges: annotations.createRange({ exact: exact, offset: found.index, selector: ''}) }));
        }
      }
      return annoRows;
    }
function(sMatch, text) {
      for (var i = 0; i < sMatch.matches.length; i++) {
        var r = sMatch.matches[i];
        var found = text.match(r);

        if (found) {
          var exact = found[0];
          var value = found[1].trim();
          var key = sMatch.fields[i];
          annoRows.push(annotations.createAnnotation({type: 'valueQuote', annotatedBy: sMatch.name, hasTarget: uri, key: key, value: value, ranges: annotations.createRange({ exact: exact, offset: found.index, selector: ''}) }));
        }
      }
      return annoRows;
    }
function ( sMatch , text ) { for ( var i = 0 ; i < sMatch . matches . length ; i ++ ) { var r = sMatch . matches [ i ] ; var found = text . match ( r ) ; if ( found ) { var exact = found [ 0 ] ; var value = found [ 1 ] . trim ( ) ; var key = sMatch . fields [ i ] ; annoRows . push ( annotations . createAnnotation ( { type : 'valueQuote' , annotatedBy : sMatch . name , hasTarget : uri , key : key , value : value , ranges : annotations . createRange ( { exact : exact , offset : found . index , selector : '' } ) } ) ) ; } } return annoRows ; }
match a series of regexes, setting any found values
match a series of regexes setting any found values