in reply to How do I select text between two bits of text?
For multiple matches:
use strict; use warnings; my ($SFS, $device); $SFS = join '', <DATA>; while ($SFS =~ m|<a name="(.*?)"|sg) { $device = $1; print "$device\n"; } __DATA__ <a name="alpha"></a> <a name="bravo"></a> <a name="charlie"></a>
To the OP: It's generally better practice to give us a sample of the input data (in this case, the HTML page) so we can be sure to give you exactly what you need.
|
|---|