This is an expected result. Since you are trying to match from a new line character (n, 1) to the next n (3), the next search will begin after the second n (3). For instance, after “nlern” is matched, the following search will begin at “lers”.
If you need to search every line, you will need to remove either 1 or 3, or you might want to use lookahead or lookbehind search. Please see
for details about the syntax of regular expressions.
I hope this helps you understand.