Re: Trouble with pattern matching

2003-03-12 Thread Stefan Lidman
Francesco del Vecchio wrote: I have this string: /tdtd width=3 background=img/colore_grigio.gifimg 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;

Re: Trouble with pattern matching

2003-03-12 Thread Rob Dixon
Stefan Lidman wrote: Francesco del Vecchio wrote: I have this string: /tdtd width=3 background=img/colore_grigio.gifimg 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 =

Trouble with pattern matching

2003-03-11 Thread Francesco del Vecchio
I have this string: /tdtd width=3 background=img/colore_grigio.gifimg 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

Re: Trouble with pattern matching

2003-03-11 Thread Aimal Pashtoonmal
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