in reply to Re: Backreferences
in thread Backreferences
You want:No, that's not quite right, because he wants to find hrefs that are (probably) mistakes, stopping at the first space or > character. Something like this is closer, although I'm sure the regex gurus can improve on it:$line =~ /\shref=(["'])?([^\s\>]+)\1/;
$line =~ /\shref=(["'])?(.+?)(?=[\s>]|\1|$)/;
|
|---|