Hi,

I would have thought the curley braces are the problem, have you tried the following 
line:

$line =~ s/background(\s?)(=?)(\"?)(.*?)(\"?)\s/background=$tosubstitute/i;

aim.
=======================================================================
Francesco del Vecchio wrote:

> I have this string:
>
> </td><td width=3 background="img/colore_grigio.gif"><img src="img/colore_grigio.gif" 
> width=1
> height=1></td></table>
>
> I would like to replace the background adding the absolutepath. So I write this code
>
> $tosubstitute = url($4,$baseurl)->abs->as_string;
> $tosubstitute =qq($tosubstitute);
> $line =~ s{background(\s?)(=?)(\"?)(.*?)(\"?)\s}{background=$tosubstitute }i;
>
> checking the $tosubstitute variable it's value is correct...but I obtain this
>
> </td><td width=3 background=http://www.html.it/img/colore_grigio.gif%22%3E%3Cimg
> src="img/colore_grigio.gif" width=1 height=1></td></table>
>
> note that this strange chars (%22%3E%3Cimg) have appeared. What can I do to make it 
> work?
>
> Francesco
>
> __________________________________________________
> Do you Yahoo!?
> Yahoo! Web Hosting - establish your business online
> http://webhosting.yahoo.com
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to