Remove path from <img src=...>
Posted: Fri Mar 31, 2006 1:45 pm
Hi,
I have several html files, that contain images (jpg and gif). I want to strip the paths, and keep only the filename, can that be done?
They all have different codes, from which I want to remove the red parts:
<img src="http://www.somedomain.com/blabla/file1.jpg">
<img src=http://www.somewhere.net/blabla/blabla2/file2.jpg>
<img src=http://www.myhomepage.com/folder/file3.gif height=100>
<img src="http://www.hello.com/file4.jpg" alt="blabla">
tags like <a href="http://www.google.nl>Google</a> should stay intact!
Thanks for the help!
I have several html files, that contain images (jpg and gif). I want to strip the paths, and keep only the filename, can that be done?
They all have different codes, from which I want to remove the red parts:
<img src="http://www.somedomain.com/blabla/file1.jpg">
<img src=http://www.somewhere.net/blabla/blabla2/file2.jpg>
<img src=http://www.myhomepage.com/folder/file3.gif height=100>
<img src="http://www.hello.com/file4.jpg" alt="blabla">
tags like <a href="http://www.google.nl>Google</a> should stay intact!
Thanks for the help!