I need some help please. I'm trying to find string "XYZ123" (a delimiting line) in a file. Once I find the string, I note the line it is on, return to the top of the file, and then line, by line go through the file until I'm at the line with "XYZ123" on it and stop. I don't want all occurrences changed. I can't get anything to work. Here is the concept:
Can any one help me PLEASE. Thanks in advance.
- Find the string.
- Store the line number in a var
- Go to the top of the file.
- As I go through the file, line by line I would (for instance):
if("January" is on this line, change it to "01/"
if("February" is on this line, change it to "02/"
- Go until the limit (the line with XYZ123 on it) is reached.
Can any one help me PLEASE. Thanks in advance.