That was my first take too. But I needed the index of the last matched `\n` in order to calculate the column number.