I got a text that ends on every single line with .|
And I need to replace the .| on every 5th line with .}
I did it with this code in search (((.|)*\s*\s*){5}) and replace $1.}
But that adds every 5th line a new line with .} on the beginning, but doesn't replace the .| on the end of the 5th.
And I can't figure out how to modify the code for my need!
Maybe some modification ideas for this code?