in reply to How to strip everything in a string except HTML Link

If your HTML is well-formed, you can use XML::LibXML:
#! /usr/bin/perl use warnings; use strict; use feature qw{ say }; use XML::LibXML; my $string = q~...~; my $xml = 'XML::LibXML'->load_html(string => $string); say for $xml->findnodes('//a');
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ