http://www.perlmonks.org?node_id=26408


in reply to How do I extract all text between two keywords like start and end?

Hi guys. This seems to work. I'd like some comments on this. I'm trying to further my perl education. Thanks. -Ty
$line = "start this is the start this is another end first end start h +ello start inside of hello end there end"; while ($line=~ s/\s*\bstart\b(?!.*?\bstart\b) (.+?) \bend\b//) { print $1, "\n"; }
tkroll@hawaii.edu