I ran into an odd problem.
I was creating a clip to automate some reformatting I do in a file I
receive regularly. One of the steps is to get rid of all the empty lines.
In the old Notetab 4.x, I could do that replacing \n\n+ with \n , and it
However, when I tried to do the same in Notetab Pro 5.1, I ran into all
sorts of weird problems.
First, I tried to adapt the syntax to the new regexp engine, like this:
^!Replace "\r\n[\r\n]+" >> "\r\n" TWRAS
No dice. Although (when ran in interactive mode) it reports replacing a
whole bunch of stuff, in practice the file is returned exactly the same
as it was before.
Then I tried some variations. I tried stuff like:
^!Replace "\r[\r\n]+" >> "\r\n" TWRAS
^!Replace "\r\n[\r\n]+" >> "\r" TWRAS
^!Replace "\r[\r\n]+" >> "\n" TWRAS
None of them did what it was wishing for. Some did nothing, others only
achieved partial success.
Then I tried going around the whole thing. I replaced the \r\n string
with an unused character (the nordic "Thorn", if you are interested -- I
have never seen it in any of the languages I can understand), and then
replacing the chars, like this:
^!Replace "^p" >> "Þ" TWAS
^!Replace "ÞÞ+" >> "Þ" TWRAS
^!Replace "Þ" >> "^p" TWAS
That works... but I REALLY, REALLY dislike it. It's an ugly hack. I know
that NoteTab Pro is not supposed to have problems with very long lines
anymore, but I think NoteTab Standard/Light still do? If so, there
should be a better way to accomplish this.