in reply to help regarding a regular expression in perl

Hi praveenchappa,

You may filter all the matching strings one by one as follows:

my $string = ' hi hello @begin i want this to extract yes i want @end asas x x x x x zxzxax hi hello hi hellooo @begin i want this to extract yes i want @end ...'; while ($string =~ m/\@begin([\w\W]*?)\@end/g) { print "match: $1\n"; }