Archive: Replace 1st result after a line number in a text file


Replace 1st result after a line number in a text file
Well the title of the thread probably says it all. I am in need of a function that can search for a certain text after a specified line number and replace the first matching result with a specified text.

Example:
winamp
nullsoft
winamp
winamp
nsis


I want to replace the 1st "amp" found after line 2 with "bla". It then becomes:
winamp
nullsoft
winbla
winamp
nsis


Anyone ?


http://nsis.sourceforge.net/archive/...b.php?page=316

-Stu