@Hasso: I agree. Besides, variables named as numbers are used as the script's parameters in ahk.
Here's my small contribution, it being a function, it also returns how many lines where removed:
Code:
MsgBox, % FileRemoveLine("YourFile.txt", "YourText") . " lines have been removed."
FileRemoveLine(paramFile, paramKey)
{
c := 0, tmp := A_Temp . "\TMP_" . A_ScriptName . "_" . A_TickCount . ".txt"
Loop, Read, % paramFile, % tmp
IfNotInString, A_LoopReadLine, % paramKey
FileAppend, % A_LoopReadLine
Else c++
FileMove, % tmp, % paramFile, 1
Return c
}