Re: Trouble with pattern matching

2003-03-12 Thread Rob Dixon
Stefan Lidman wrote: > Francesco del Vecchio wrote: > > > > I have this string: > > > > > src="img/colore_grigio.gif" width=1 height=1> > > > > 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 Stefan Lidman
Francesco del Vecchio wrote: > > I have this string: > > width=1 > height=1> > > 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?)(=?)(\"?)

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 str

Trouble with pattern matching

2003-03-11 Thread Francesco del Vecchio
I have this string: 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