lib/util.js
function findNextOutside(data, items, index, exclude) {
    var result, positionResult = {start: 0, end: index ? index - 1 : -1};

    do {
        result = findNext(data, items, positionResult.end + 1);
    } while (result.index !== -1 && (positionResult = inPosition(result.index, exclude)));
    return result;
}
function findNextOutside(data, items, index, exclude) {
    var result, positionResult = {start: 0, end: index ? index - 1 : -1};

    do {
        result = findNext(data, items, positionResult.end + 1);
    } while (result.index !== -1 && (positionResult = inPosition(result.index, exclude)));
    return result;
}
function findNextOutside ( data , items , index , exclude ) { var result , positionResult = { start : 0 , end : index ? index - 1 : - 1 } ; do { result = findNext ( data , items , positionResult . end + 1 ) ; } while ( result . index !== - 1 && ( positionResult = inPosition ( result . index , exclude ) ) ) ; return result ; }
Finds the next one of the items outside of the given positions

@param {String} data The string to search
@param {Array<String>} items The items to find
@param {Number=0} index The start index
@param {Array<{start: Number, end: Number}>} exclude The boundaries to exclude
@returns {{index: Number, found: String}} The found index and the found item
Finds the next one of the items outside of the given positions