Bug 145856 - The ^ expression is not matching anything in Find and Replace
Summary: The ^ expression is not matching anything in Find and Replace
Status: RESOLVED DUPLICATE of bug 135538
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.2.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-23 18:45 UTC by Edier Guzman
Modified: 2021-11-23 20:23 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edier Guzman 2021-11-23 18:45:15 UTC
Description:
When trying to put anything at the beginning of each string selected, doing a Find And Replace with ^, is not working. It does not match anything.
It's weird as the $ expression is working fine for putting anything at the end of each string.
Why Calc is not matching anything? ^ is as valid as $, or am I wrong?

I'm using Linux Fedora 35 but it's not working in Windows 10 either. I just tested it.

Steps to Reproduce:
1.Type Ctrl+H to open "find and replace"
2.In the "Find" field type '^' (regular expression for matching beginning of string) and in the "Replace" field put anything you want to put at the beginning of each filled cell
3.In "Other Options" activate "Regular Expressions"
4. Press the "Find Next" button, you will see that Calc is not able to find anything. This is a bug, as ^ is a valid regular expression that matches a beginning of string. If you try with $, you will notice that Calc will match all the end of strings. So Calc is misbehaving with ^ as regular expression pattern. 

Actual Results:
No cell, nor string, nor pattern is found

Expected Results:
It should have matched all filled cells, as ^ is a valid regular expression for beginning of string. Please, notice that $ works good when trying to match end of string. So, why is ^ not working??


Reproducible: Always


User Profile Reset: Yes


OpenGL enabled: Yes

Additional Info:
Version: 7.2.2.2
Build ID: 20(Build:2)
CPU threads: 4; OS: Linux 5.14; UI render: default; VCL: gtk3
Locale: en-GB (en_GB.UTF-8); UI: en-US
Calc: threaded
Comment 1 LeroyG 2021-11-23 20:23:19 UTC

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