lib/stmd.js
function(re, s, offset) {
  var res = s.slice(offset).match(re);
  if (res) {
    return offset + res.index;
  } else {
    return null;
  }
}
function(re, s, offset) {
  var res = s.slice(offset).match(re);
  if (res) {
    return offset + res.index;
  } else {
    return null;
  }
}
function ( re , s , offset ) { var res = s . slice ( offset ) . match ( re ) ; if ( res ) { return offset + res . index ; } else { return null ; } }
Attempt to match a regex in string s at offset offset. Return index of match or null.
Attempt to match a regex in string s at offset offset . Return index of match or null .