'<div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div>'
arr = ['<div class="abc"></div>' , '<div class="abc"></div>' , ...]
const str = '<div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div>';
const result = str.split('</div>').reduce((prev, curr, index, arr) => {
if (index !== arr.length - 1) prev[index] = curr + '</div>';
return prev;
}, []);
// ["<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>", "<div class="abc"></div>"]
const str = "<div class='abc'></div><div class='abc'></div>";
const array = $(str);
array.each((_, el) => console.log(el));
// результат
// <div class="abc"></div>
// <div class="abc"></div>
const div = document.createElement('div');
div.innerHTML = str;
const arr = Array.prototype.map.call(div.children, n => n.outerHTML);
const arr = Array.from(
new DOMParser().parseFromString(str, 'text/html').body.children,
n => n.outerHTML
);
const arr = [];
for (const n of document.createRange().createContextualFragment(str).children) {
arr.push(n.outerHTML);
}
var str = '<div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div><div class="abc"></div>';
var regexp = /(<div class="abc"><\/div>)/g;
var matches_array = str.match(regexp);