0

Just found out that matchAll is not supported by many browser versions.

Is there an ES5 safe alternative for the string.prototype.matchAll method?

const regexp = /(?:\[(.*?)\]\((.*?)\))|([^[]+)/g;
const matchedElements = Array.from(value.matchAll(regexp));
cbdeveloper
  • 27,898
  • 37
  • 155
  • 336

0 Answers0