I am trying to find an replace line end \n
using a macro (python).
I create a search descriptor via a writer document xDocument.createReplaceDescriptor()
method.
I set the SearchRegularExpression propery to True
.
No matter what I try I am not able to match a simple string with when I inlcude \n
.
A search string of abc\n
will not match, but abc$
will match.
The issue I am having with abc$
is the line end is not replaced when I do a replace using the search descriptor.
I want to find a match including the \n
so I can replace the find and the line ending.
This has to be done in code for my needs.
For example if I had the following:
1
a
2
b
3
c
I want to do a find and replace using a macro so the result would be:
1a
2b
3c