Javascript String getMatches(regex)

Description

Javascript String getMatches(regex)


String.prototype.getMatches = function(regex)
{
  var out = null;
  
  if (regex.test(this))
    out = regex.exec(this);//from   w ww . j  ava2  s.c om
  
  return(out);
};



PreviousNext

Related