Hi. I've got the following problem. I've taken over a website of about 1200 static pages. Yes, that's right, 1200 static pages. Containing roundabout a zillion working and broken links. I've done my job and made a system that actually works, importing each page (manually with a publishing tool written for the occation in PHP), adding the metadata needed for nice searching and presenting in the three languages I need to support, and actually got the system working. (yes, I will probably be writing an article about the lot, because it contained multiple fun challenges (and of course the bit about 1200 pages routine work :-/ ) ) To finish off, I've got one last barrier. All these pages contained links. Because I've actually categorized the information, in addition to the already broken links, most are now totally broken. I've set up a handler that takes care of the most 'duh'-style breaks (like index.html now being index.php), but I've still go to go through all these funny links and change them. Because I'm a user at the box, not root, and the webserver owns most of the documents that I've only got read-access to, I need to make a script that reads the document, extracts all the links (a href and img src mainly) and lets me edit them. Does anyone have a decent regex string that would allow me to get all the links and then do a search-replace through the document to put in the correct ones?
Cheers Nik -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]