hi
we need to replace tags like:
to:
it seems so simple but i am on the verge of giving up understanding the
negative lookahead logic.
this is how far i have come (obviously not working)
my $src = qq();
$src =~ s/(]+\/))>/$1\/>/ig;
print $src
anyone with a clearer mind that can help
On Tue, Sep 17, 2002 at 12:00:45PM +0200, allan juul wrote:
> hi
>
> we need to replace tags like:
>
>
>
> to:
>
>
>
>
> it seems so simple but i am on the verge of giving up understanding the
> negative lookahead logic.
>
> this is how far i have come (obviously not working)
>
> my $s
"Ronald J. Kimball" wrote:
> > my $src = qq();
> > $src =~ s/(]+\/))>/$1\/>/ig;
> > print $src
>
> The negative lookahead part is fine, except that it doesn't actually match
> the rest of the tag, so your replacement puts the /> in the middle of the
> tag and leaves the rest intact.
correct, i m
on 9/17/02 11:24 AM, [EMAIL PROTECTED] purportedly said:
>> I think this will work pretty well:
>>
>> $src =~ s,(]+)(?,$1 />,ig;
>
>
> yes of couse, lookbehind ;)
>
> hmm, would it be possible to actually do it without using lookbehind
Yes, if you don't mind re-writing tags that are already