Is similar to 37494 and I agree with 38261 but this is specific to Writer and using a regular expression in the Replace field. I am trying to change the end of paragraph (reg exp $) with a tab (\t) It finds the end of paragraph just fine when I put the $ into the Find field and have regular expression checkbox on. I put \t into the Replace field and it changes the end of paragraph to a slash and a t. I have tried different regular expressions in the Find field and all that I have tried seem to work. I have tried \t, \n, \u0009, \x09 in the Replace field and each time I get the characters, as if the regular expression box was not checked. I read another post that said that Replace ALL worked when Replace did not. I tried that also but still got characters. O a;sp tried copying a tab from somewhere else in the document and pasting it into the Replace field. Did not work. Did finally find a workaround but it does not eliminate the bug. Workaround: 1. Manually place a Tab in the document. 2. Select and Copy that Tab. 3. Select area to be searched. 4. open Find and Replace dialog box. 5. Type in $ in Find field. 6. Make sure Current Selection and Regular Expression boxes are checked. 7. Click FIND ALL. 8. CTRL-V to paste the copied Tab into all the Find All places.
Confirmed on 5.1 and 5.2: \t on the "replace by" box with RegExp enabled gives a \t instead of a tab. Other RegExp still work on "replace", like \n, but \t does not even if help says it should https://help.libreoffice.org/Common/List_of_Regular_Expressions
Same problem found in version Version: 4.2.8.2 Build ID: 420m0(Build:2) also noticed that if I go to replace ;$ (semicolon followed by eol) with ; (semicolon space) it will replace semicolon eol with space eol, leaving the EOL.
The \t as a replacement seems does work. Except... It seems like using the very common "^$" regex match of an empty paragraph puts the search into a mode where the \t does not get parsed. That makes Finding an empty string paragraph as target, and replacing with a string containing a \t <Tab> rather hard.
*** Bug 107429 has been marked as a duplicate of this bug. ***
This will require some kind of hacky programming to fix. "$" and "^$" are definitely edge cases. -sw/source/core/crsr/findtxt.cxx:DoSearch() - if it fails, then checks for three special searches const bool bChkEmptyPara = bRegSearch && 2 == rSearchOpt.searchString.getLength() && ( rSearchOpt.searchString == "^$" || rSearchOpt.searchString == "$^" ); const bool bChkParaEnd = bRegSearch && rSearchOpt.searchString == "$"; proposed hack: https://gerrit.libreoffice.org/49387
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=9bb369edf5471d0b29b5cea86d7203831f93d529 tdf#102374: regex allow ReplaceBackReferences for $ search It will be available in 6.1.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/core/commit/?id=5054456a6ed8ef7cd2a05fb09e1954eb02eaf0f7&h=libreoffice-6-0 tdf#102374: regex allow ReplaceBackReferences for $ search It will be available in 6.0.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
*** Bug 91033 has been marked as a duplicate of this bug. ***
*** Bug 112575 has been marked as a duplicate of this bug. ***