Posted by Frank Hale on 1999-05-28
how would I match newlines in perl?
for example I have the following code which will match fine except it
can't contain any newlines:
# This matches the expression: template { (any characters) }
if ($token =~ /template{(.*)}/) {
print $1."\n";
}
I want to be able to have newlines in the expression for example it
should match the following expression:
template{
<h1>$name</h1><br>
<h1>$email</h1><br>
<h1>$date</h1><br>
<h1>$message</h1><br>
};
--
From: Frank Hale
Email: frankhale@xxxxx.xxx
ICQ: 7205161
Linux: http://www.netalive.org/nets_linux.html
Previous post | Next post | Timeline | Home