Ask Your Question
0

How to select a part of a backreference string in LibreOffice Writer

asked 2017-02-14 06:43:03 +0200

AlexShinjuku gravatar image

Hi there,

I am trying to change the format of strings of characters (in LibreOffice Writer Version: 4.2.8.2 Linux) that are between two specific characters ( ' ] ' and ' = '). After some search on Regular Expressions, I was able to find the strings I am looking for by searching for '].+='.

The problem is that I do not want to change the format of the first and last characters ('[' and '='), only the characters in between. Is there a simple way to do that or to search differently so that these characters are not included in the result of the search?

When using the back reference character '&' in the 'replace with' box, is there a way to exclude the first and last characters?

One more question, can a 'search / replace with' request be saved so that it can be reused easily later on?

Thank you in advance for your time and help.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-02-14 08:39:26 +0200

pierre-yves samyn gravatar image

updated 2017-02-14 08:44:09 +0200

Hi

Find: (?<=\])[^=]+(?==)

Explanations here: use of Look-ahead & behind assertions

I have not tried but I know that you can save "batch" search&replace with AltSearch extension.

Regards

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-02-14 06:43:03 +0200

Seen: 186 times

Last updated: Feb 14 '17