src/parseString.js
function matchAll (regex, string) {
  let match
  let matches = []
  while ((match = regex.exec(string)) !== null) {
    delete match['index']
    delete match['input']
    matches.push(match)
  }

  return matches
}
function matchAll (regex, string) {
  let match
  let matches = []
  while ((match = regex.exec(string)) !== null) {
    delete match['index']
    delete match['input']
    matches.push(match)
  }

  return matches
}
Get all matches of a regex in a string as an array