I'm not sure I quite understand what you are asking... but something like this?
use strict;
my $string = q|
<p>just a test</p>
<center>something here
and some more
or here</center><BR><BR>
<center>something here
and some more
or here</center>
|;
$string =~ s/\<center>(.*?)\</center>//sg;
print "Content-type: text/html \n\n";
print $string;
That should return something like;
<BR><BR>
This is untested, but it should work :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Code:
#!/usr/bin/perl use strict;
my $string = q|
<p>just a test</p>
<center>something here
and some more
or here</center><BR><BR>
<center>something here
and some more
or here</center>
|;
$string =~ s/\<center>(.*?)\</center>//sg;
print "Content-type: text/html \n\n";
print $string;
That should return something like;
Quote:
<p>just a test</p> <BR><BR>
This is untested, but it should work :)
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!