let text = `
<p>Hello world</p>
<a href="text">Link1</a>
<a href="text">Link2</a>
`;
const checkLinks = new RegExp('<a(.+?)>(.+?)</a>', 'g');
let params = text.match(checkLinks);