- or download this
<a href="link1">link 1</a>Some text<a href="link2">link 2</a>
- or download this
link1">link 1</a>Some text<a href="link2"
- or download this
link1
- or download this
m/<a href="\s*(.+?)\s*"/g # non-greedy due to .*?
m/<a href="\s*([^"]+)\s*"/g # stops at first "
- or download this
$html =~ s!(<a href="\s*)([^"]+)(\s*")!${1}foo$2$3!g;