would like to know how or where i can find code to parse a ascii text file. it needs to open the file search for a specified keyword or phrase. if not found the write the line as is, if found the remove the target and wrte the rest of the line with out the target.

example:

open file test1.txt
look for : http

sample:

first
second
note: http..........
third
fourth

output file: test2.txt

first
second
note:
third
fourth

lines can be small or large


thanks....