I tried to replace double linefeeds with one linefeed. Option: 'Regular expression' is checked. Tried 'search in' formular and value. Search for: "\n\n" (empty lines) Replace with: "\n" (remove empty line) Result: all double-linefeeds are replaced with text "\n". sample: before: AAA BBB after replace: AAA\nBBB expected: AAA BBB
Created attachment 78775 [details] search popup
Thanks for reporting. As far I tested, I can not reproduce this behavior. But I think it highly depends on what kind of newlines you used in the file. There is a shift+enter (hard return) or a 'normal' return (sorry if I'm using the wrong terms). Is it possible to attach a test file you can reproduce this behavior with? Thanks in advance, Joren
Simple steps to reproduce: (based on bug desc) 1. In cell A1, enter: AAA+(ctrl+enter)+(ctrl+enter)+BBB -> enter to ok 2. Ctrl+H -> checkmark 'Regular expressions' & 'Backwards' -> enter: \n\n in 'Search for'; \n in 'Replace with' 3. Click 'Replace' or 'Replace All' Note that if we only enter \n in 'Search for' & blank 'Replace with', we can get result as expected on comment 0 (by clicking 'Replace'). But...clicking 'Replace all' get different result. Strange..I don't know what behavior should be with this regular expression. Confirmed with LO 3.6.6.2 (Ubuntu 12.04 32bit). As far as I remember this also happen on LO 4.0.3 or 4.0.4 (Win7 32bit) Seems like duplicate of Bug 43107
(In reply to comment #3) > Seems like duplicate of Bug 43107 Nice one :)! Looks indeed a dupe of that bug to me too. Kind regards, Joren *** This bug has been marked as a duplicate of bug 43107 ***