jaldama has asked for the wisdom of the Perl Monks concerning the following question:
I'm trying to extract a string that is found between [] brackets on multiple lines, but I can't seem to get it right. Any advice?
if ($file =~ m/\[(.*?)\]/m ) { my $inside = $1; print "$inside\n"; }
The $file looks something like this:
Something [ 'name', 'joe', 'bopeep' ]
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Multiline Regex Issue
by moritz (Cardinal) on Feb 02, 2012 at 19:11 UTC | |
by kennethk (Abbot) on Feb 02, 2012 at 19:22 UTC | |
by jaldama (Acolyte) on Feb 02, 2012 at 21:52 UTC |
Back to
Seekers of Perl Wisdom