Hi,
Really struggling to find a solution to this one :|
We have the following in a HTML extract, which I'm trying to replace with the value from $image_url (defined in another routine, but that's irrespective of the problem, as some of the URL's are being changed ok, but not others :/).
The HTML looks like;
<img width=588 height=381 src="35598-Science%20Coursework1_files/image002.gif">
<img width=28 height=28 src="35598-Science%20Coursework1_files/image003.gif">
..and the regex is;
$content =~ s|\Qsrc="\E(.*?)/(.*?)\"\>|src="$image_path/$2.$3">|sig;
There are 3 images in the sample HTML document I'm trying to process;
<img width=28 height=28 src="35598-Science%20Coursework1_files/image002.gif">
<img width=28 height=28 src="35598-Science%20Coursework1_files/image003.jpg">
The 001 and 003 images are being replaced correctly by the regex- but not the 002 image!
Can *anyone* see my obvious mistake. I'm loosing my haid over this one (what I've got left ;))
TIA!
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!
Really struggling to find a solution to this one :|
We have the following in a HTML extract, which I'm trying to replace with the value from $image_url (defined in another routine, but that's irrespective of the problem, as some of the URL's are being changed ok, but not others :/).
The HTML looks like;
<img width=588 height=381 src="35598-Science%20Coursework1_files/image002.gif">
<img width=28 height=28 src="35598-Science%20Coursework1_files/image003.gif">
..and the regex is;
$content =~ s|\Qsrc="\E(.*?)/(.*?)\"\>|src="$image_path/$2.$3">|sig;
There are 3 images in the sample HTML document I'm trying to process;
Quote:
<img width=588 height=381 src="35598-Science%20Coursework1_files/image001.gif"> <img width=28 height=28 src="35598-Science%20Coursework1_files/image002.gif">
<img width=28 height=28 src="35598-Science%20Coursework1_files/image003.jpg">
The 001 and 003 images are being replaced correctly by the regex- but not the 002 image!
Can *anyone* see my obvious mistake. I'm loosing my haid over this one (what I've got left ;))
TIA!
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!