Home : General : Perl Programming :

General: Perl Programming: Re: [ronzo] regex help please: Edit Log

Here is the list of edits for this post
Re: [ronzo] regex help please
I'm not sure I quite understand what you are asking... but something like this?

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!

Last edited by:

Andy: Jan 26, 2004, 8:41 AM

Edit Log: