in reply to regex problem
It think this solves your problem:
foreach my $email (@split_msg) { my ($title, $tags, $msg); $email =~ m/\[title\](.+)\[title\]/i; $title = $1; # match in single line mode $email =~ m/\[message\](.*)\[message\]/is; $msg = $1; # match is again in $1 print "TITLE:$title\nMESSAGE:$msg\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: regex problem
by jaimon (Sexton) on Mar 18, 2011 at 14:08 UTC | |
by arkturuz (Curate) on Mar 22, 2011 at 12:53 UTC |
In Section
Seekers of Perl Wisdom