in reply to Append a line with special characters before a string
The general approach would be to read the file line by line and append the <link ...> tag whenever you find <body ... in it.
To give you more concise help, can you tell us where exactly you are having problems? If you show us the code you've already written, that helps us help you much better.
Do you have problems with the general program structure? Are loops and conditional statements a problem for you?
Do you have problems finding the <body string? Do you have example input data that you think should work with the code you have but doesn't?
|
|---|