in reply to Contents b/w two given text

my $string = "blah text1 you mean something like this? text2 blah blah +"; if ($string =~ m/text1(.*?)text2/) { print $1; }
---
my name's not Keith, and I'm not reasonable.

Replies are listed 'Best First'.
Re^2: Contents b/w two given text
by davebaker (Pilgrim) on Aug 25, 2005 at 11:58 UTC
    I think you want a modifier as part of the regular expression if you want to match text that includes a line break.
A reply falls below the community's threshold of quality. You may see it by logging in.