Hello, i need help, i want to search and replace in a file but only in the last line of the file, it's posibble??
Many thanks.
Fernando.
Searching/replacing in the last line of file
-
- Posts: 1
- Joined: Tue Aug 23, 2011 10:51 am
Re: Searching/replacing in the last line of file
Yes, it's possible.
Use the EOF (End of File) anchor $. Anything before that is definitely on the last line, unless it is an empty line. You might want to use something like matchpattern\r\n$
Use the EOF (End of File) anchor $. Anything before that is definitely on the last line, unless it is an empty line. You might want to use something like matchpattern\r\n$