in reply to Re^2: pattern matching once
in thread pattern matching once
use strict; use warnings; my @lines = ("https://www.sec.gov/Archives/edgar/data/831001/000095010 +323011632/0000950103-23-011632.txt\n", "<FILENAME>dp198076_424b2-us2342673.htmSomeCrap\n", "<FILENAME>dp198076_424b2-us2342673.htm\n", "<FILENAME>dp198076_exfilingfees.htm\n", ); foreach my $line (@lines) { if (my ($doc_title) = $line=~ m/<FILENAME>(.*\.htm)\b/) { print "Filename is $doc_title\n"; last; ############### this stops } } __END__ Filename is dp198076_424b2-us2342673.htm
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: pattern matching once
by justin423 (Scribe) on Aug 11, 2023 at 16:58 UTC | |
by Marshall (Canon) on Aug 11, 2023 at 19:45 UTC | |
by justin423 (Scribe) on Aug 12, 2023 at 03:08 UTC | |
by Marshall (Canon) on Aug 12, 2023 at 07:23 UTC |