Bug 43086 - Regular expression "\n" in replace field of Calc's search and replace replaces with \n instead of paragraph break
Summary: Regular expression "\n" in replace field of Calc's search and replace replace...
Status: RESOLVED DUPLICATE of bug 43107
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
3.4.3 release
Hardware: All All
: medium minor
Assignee: Not Assigned
Depends on:
Reported: 2011-11-19 03:21 UTC by Shahar Or
Modified: 2011-11-20 05:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Shahar Or 2011-11-19 03:21:49 UTC
In Calc's search and replace feature, entering "\n" in the replace field is treated as regular text.

It would be useful to use "\n" for new line in Calc.

This is first reported on Ubuntu:
Comment 1 Christopher M. Penalver 2011-11-19 03:59:20 UTC
Shahar Or, in order to have \n treated as a new line, one must click the "More Options" button -> check "Regular expressions". Thank you for reporting this and feel free to report any future bugs you may find.
Comment 2 Shahar Or 2011-11-19 04:05:56 UTC
Christopher M. Penalver,

I am aware that the "Regular expressions" checkbox needs to be ticked.

However, this doesn't help. It is still treated as text.

Notice that this is in the replace field and not in the search field. Actually, it doesn't find newlines either.
Comment 3 Christopher M. Penalver 2011-11-19 06:31:19 UTC
Shahar Or, this is unreproducible in LibreOffice Calc 3.4.4, which is available downstream via PPA or enabling the Proposed repository.

lsb_release -rd
Description:	Ubuntu 11.10
Release:	11.10

apt-cache policy libreoffice-calc
  Installed: 1:3.4.4-0ubuntu1~ppa1
  Candidate: 1:3.4.4-0ubuntu1~ppa1
  Version table:
 *** 1:3.4.4-0ubuntu1~ppa1 0
        500 http://ppa.launchpad.net/libreoffice/ppa/ubuntu/ oneiric/main i386 Packages
        100 /var/lib/dpkg/status
     1:3.4.3-3ubuntu2 0
        500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main i386 Packages
Comment 4 Shahar Or 2011-11-20 01:21:49 UTC
In 3.4.4 from Ubuntu PPA searching for "\n" regular expression works. It can find new lines in Calc.

Replacing text with "\n" still gives "\n" as text and not as new line.
Comment 5 Christopher M. Penalver 2011-11-20 04:32:34 UTC
Shahar Or, please do not toggle the version. For more on this please see http://wiki.documentfoundation.org/BugReport_Details#Version Regarding "\n" in the replace field, this will replace whatever is found with a paragraph break, not a line break. For more on this please see http://help.libreoffice.org/Common/List_of_Regular_Expressions

Comment 6 Shahar Or 2011-11-20 04:55:44 UTC
Christopher M. Penalver, well, what I'm trying to achieve is that I create a line break in Calc's search and replace.

Now, you say that "\n" produces a paragraph break. Perhaps you're talking about Writer. Because in Calc it doesn't produce a paragraph break. In Calc it produces "\n" as if it wasn't a special denotation. As if it was text.

So I understand and appreciate your efforts in keeping the issue tracker clean but there really is an issue here. I don't mind to mark it as a feature request but I really do think that the expectation of this to work is reasonable and I have found this issue mentioned in a few corners of the web.
Comment 7 Christopher M. Penalver 2011-11-20 05:21:38 UTC

*** This bug has been marked as a duplicate of bug 43107 ***