use strict; use warnings; for(<DATA>){ print if s/.*a href="(.*)".*/$1/; } __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>
Output:
C:\Users\James\Desktop\perlmonks>perlmonks.pl /Archives/edgar/data/1050122/000092735601000365/0000927356-01-00¡0365- +0009.txt
EDIT: It seems that $/ = "</html>"; manipulates the input record seperator in such a way it does completely break the functionality of the simple regex. Do yu have any links to documentation on this $/ = "</html>"; ?
In reply to Re^3: REGEX for url
by james28909
in thread REGEX for url
by wrkrbeee
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |