in reply to Re^3: REGEX for urlin thread REGEX for url
It can also handle multiple URL's.
use strict; use warnings; $/="</html>"; for(<DATA>){ print"$1\n" while /a href="(.*)"/g; } __DATA__ <td scope="row">9</td> <td scope="row">SUBSIDIARIES OF THE REGISTRANT</td> <td scope="row"><a href="/Archives/edgar/data/1050122/0000 +92735601000365/0000927356-01-000365- 0009.txt">0009.txt</a></td> <td scope="row">EX-21.1</td> <td scope="row"><a href="/Another/URL/here.html">0009.txt</a></td> [download]
This is not an optical illusion, it just looks like one.
Not able to check it on my machine, but wouldn't a /s be helpful here to be able to pass over the newlines?