code: function step3(token) {
      var r1 = getR1(token);
  
      if (!r1)
          return token;
  
      var r1Match = r1.match(/(leg|eleg|ig|eig|lig|elig|els|lov|elov|slov|hetslov)$/);
  
      if (r1Match) {
          return token.replace(new RegExp(r1Match[1] + '$'), '');
      }
  
      return token;
  }
docs: step 3 as defined for the porter stemmer algorithm.