I was wondering if there was a way of matching the end of a file in Notepad++ other than putting myself there a special combination of characters. By default, $ seems to match the end of the line, and not the end of a file.



You can try the following regex to match the end of your file:


According to the regex documentation referenced by the Notepad++ Wiki \z matches at the end of a buffer only. A buffer in this context is the whole of the input text.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.