Regex to replace href links from static html

Hi, I am in the process of migrating some static html pages to ROR . See http://pm.tamil.net/akaram_uni.html. Currently it is difficult to migrate because the href references point to different locations. Eg.http://www.tamil.net/projectmadurai/pub/pm0027/pm0027.pdf http://www.tamil.net/projectmadurai/pub/pm0241/pm0241.pdf I want to move the .pdf files to one location and point the href references to one location. Please note that this is one such .html. I got loads of .html files similarly each href locations are pointing to different locations. Please provide me a regex expression to find and replace all such locations.

Cheers Amala Singh Telford UK

Hi, I am in the process of migrating some static html pages to ROR . Seehttp://pm.tamil.net/akaram_uni.html. Currently it is difficult to migrate because the href references point to different locations. Eg.http://www.tamil.net/projectmadurai/pub/pm0027/pm0027.pdfhttp://www.tamil.net/projectmadurai/pub/pm0241/pm0241.pdf I want to move the .pdf files to one location and point the href references to one location.

You really don't want to use a regex to parse html - you'll end up in a world of pain. Use an actual html parser like Nokogiri

Fred