Bug 145774 - Find and Replace (with regular expression option): ^ is not found in search
Summary: Find and Replace (with regular expression option): ^ is not found in search
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2021-11-19 10:19 UTC by Salek Talangi
Modified: 2021-11-20 14:25 UTC (History)
0 users

See Also:
Crash report or crash signature:

Screenshot displaying the problem (28.71 KB, image/png)
2021-11-19 10:19 UTC, Salek Talangi

Note You need to log in before you can comment on or make changes to this bug.
Description Salek Talangi 2021-11-19 10:19:58 UTC
Created attachment 176358 [details]
Screenshot displaying the problem

Problem description: I'm trying to change a doc that looks like this and found an issue with rexexp find while doing so.


I want to add XX- to the beginning of the cells. Normally I'd do it like this:
Search: ^
Replace: XX-

but this does not work, as ^ does not find anything. ^A does, but then I'd be deleting the A.

Search: ^(.*)
Replace: XX-$1
works, but seems like a workaround.

A single $ as search string to add to the end of the cells does work though.

So the problem seems to be with the single ^ only.

Version: (x64) / LibreOffice Community
Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: threaded
Comment 1 Michael Warner 2021-11-19 15:32:25 UTC
Thanks for writing this report, but I think this is a duplicate of bug 135538.

*** This bug has been marked as a duplicate of bug 135538 ***
Comment 2 Salek Talangi 2021-11-19 15:59:25 UTC
Hi, I'm not sure this is true - or the other bug report needs an update.
$ is working fine, and I think this is a zero length match as well.
Comment 3 Michael Warner 2021-11-20 14:25:23 UTC
Well, I suspect it's the same root cause. But we can change it to just See Also for now. Either way, I can confirm that $ works and ^ does not. 

Version: / LibreOffice Community
Build ID: 02b2acce88a210515b4a5bb2e46cbfb63fe97d56
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded