For example, if I start a tail on a file with 17 existing lines, pass nLines: 50 and dropLastToken = 1, the regex ends up as: (?:[^\r\n]*[\r]{0,1}\n){-34}
Since it doesn't make sense to look for a negative number of matches, regex instead looks for -34 literally. The result is zero matches.
At the following line, when nLines >= tokens.length, the existing contents of the file are not emitted as
line
events.https://github.com/lucagrulla/node-tail/blob/6a771ef65b0dbdeba41f8b97bcf41f437d45db9b/src/tail.js#L62
For example, if I start a tail on a file with 17 existing lines, pass
nLines: 50
and dropLastToken = 1, the regex ends up as:(?:[^\r\n]*[\r]{0,1}\n){-34}
Since it doesn't make sense to look for a negative number of matches, regex instead looks for
-34
literally. The result is zero matches.