in reply to Changing .html to .asp

If all you need/want to do is change every HREF from a ".html" to ".asp" extension, that should be fairly easy. Build a list of all of the files you need to change and then read that file. For each entry open the file and parse it line by line looking for HREF's. When you find a HREF, do a  s/.html/.asp/ on that line. Depending how clean your HTML is, this may/may not work as there could be multiple .html referenced on each line if it's not layed out well. If it's clean this sort of thing should work. If you have ugly HTML that is not formatted well you will have to refine things to make sure you only match what you want to change.

-THRAK
www.polarlava.com

Replies are listed 'Best First'.
Re: Re: Changing .html to .asp
by little (Curate) on Apr 27, 2001 at 22:31 UTC
    THRAK, just to avoid the risk of changing the documents content as well then better make sure in your substitution that you dont match > inbetween HREF and .(s|p)?htm(l)? and ignore the case. :-)

    Have a nice day
    All decision is left to your taste