in reply to REGEX for url
I downvoted the OP (belatedly). Here's why:
"Among other expressions, I have tried: m/subsid(.*)(">)/" ... and not even in code tags, at that.
Missing from your regex: modifiers to make it case-insentive and multi-line... and context (even if simplified) to make it easy for us to spot non-regex errors.
The code in your narrative doesn't even come close to doing what you say you want. It's time for you to do some reading -- in this case, perlretut and friends -- and stop typing in poorly constructed questions every time you face an issue.
Also, you've posted too much data: if you've stated your intention precisely, then there's no need for the entire html for Row 9 of the table. This is a very poor post, even given the low quality of your recent nodes.
So here's a crummy example (see much better suggestions above re modules) constructed solely to demonstrate that if you're going down the (fool's) path of trying to parse html with a regex, it can be done. It's so bad an example that I feel free to offer it to a gimmé-artist:
#!/usr/bin/perl use strict; use warnings; my @lines = <DATA>; for my $line(@lines) { print "| $line |"; if ($line =~ /(<a href.+<\/a>)/) { # note, no need to capture the + whole of row 9 print "$1 \n\n"; } else { print "Crummy regex\n" } } __DATA__ <td scope="row">9</td> <td scope="row">SUBSIDIARIES OF THE REGISTRANT</td> <td scope="row"><a href="/Archives/edgar/data/1050122/000 +092735601000365/0000927356-01-000365-0009.txt">0009.txt</a></td> <td scope="row">EX-21.1</td></> And here's execution: <c>C:>wrkrbeejunk.pl | <td scope="row">9</td> |Crummy regex | <td scope="row">SUBSIDIARIES OF THE REGISTRANT</td> |Crummy regex | <td scope="row"><a href="/Archives/edgar/data/1050122/0 +00092735601000365/0000927356-01-000365-0009.txt">0009.txt</a></td> |<a href="/Archives/edgar/data/1050122/000092735601000365/0000927356- +01-000365-0009.txt">0009.txt</a> | <td scope="row">EX-21.1</td> |Crummy regex C:\>
|
|---|