Bug 44398 - : Find, replace, regular expression bug
Summary: : Find, replace, regular expression bug
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.5.0 Beta2
Hardware: Other All
: medium normal
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:6.3.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-01-02 13:29 UTC by petrak.lub
Modified: 2019-12-07 15:24 UTC (History)
4 users (show)

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 petrak.lub 2012-01-02 13:29:04 UTC
Problem description: 

Steps to reproduce:
1. A1 => 123456 
2. ctrl-h, in dialog
Search: ([0-9])
Replace: $1 
check regular expression

hit replace all

Current behavior:
3. A1 => 111111

Expected behavior:
3. A1 => 123456

Another case:

Steps to reproduce:
1. A1 => VarNumberA 
2. ctrl-h, in dialog
Search: ([A-Z])
Replace: <space>$1 
check regular expression
check case
hit replace all

Current behavior:
3. A1 => '  Var  umber  '

Expected behavior:
3. A1 => ' Var Number A'
(split name)

Platform (if different from the browser): 
              
Browser: Opera/9.80 (Windows NT 5.1; U; cs) Presto/2.10.229 Version/11.60
Comment 1 tester8 2012-01-20 13:42:46 UTC
Fully reproduced with

LOdev 3.5.0beta3
e40af8c-10029e3-615e522-88673a2-727f724
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI
Comment 2 Winfried Donkers 2012-05-06 23:19:46 UTC
version 3.5.3release, WindowsXP:
1. A1 => test
2. search/replace dialog, regular expression switched on:
   search test
   replace test\n (or test\r or test\r\n)
3. replace all
4. current behaviour: A1 => test\n (or test\r or test\r\n) literally
   expected behaviour; A1 => test<linefeed>
Comment 3 Winfried Donkers 2012-05-06 23:30:22 UTC
*** Bug 43107 has been marked as a duplicate of this bug. ***
Comment 4 Cor Nouws 2012-10-06 20:40:40 UTC
(In reply to comment #2)
> 4. current behaviour: A1 => test\n (or test\r or test\r\n) literally
>    expected behaviour; A1 => test<linefeed>


Is ok in 3.4.6
Comment 5 Cor Nouws 2012-10-06 20:43:44 UTC
(In reply to comment #4)
> (In reply to comment #2)
> > 4. current behaviour: A1 => test\n (or test\r or test\r\n) literally
> >    expected behaviour; A1 => test<linefeed>
> 
> 
> Is ok in 3.4.6

Is OK again in 3.5.7rc1
Comment 6 Cor Nouws 2012-10-06 20:47:19 UTC
(In reply to comment #0)
> Problem description: 
> 
> Steps to reproduce:
> 1. A1 => 123456 
> 2. ctrl-h, in dialog
> Search: ([0-9])
> Replace: $1 
> check regular expression
> 
> hit replace all
> 
> Current behavior:
> 3. A1 => 111111
> 
> Expected behavior:
> 3. A1 => 123456

Works OK in 3.4.6
in 3.5.7rc1 the result is
  A => 


> Another case:
> 
> Steps to reproduce:
> 1. A1 => VarNumberA 
> 2. ctrl-h, in dialog
> Search: ([A-Z])
> Replace: <space>$1 
> check regular expression
> check case
> hit replace all
> 
> Current behavior:
> 3. A1 => '  Var  umber  '
> 
> Expected behavior:
> 3. A1 => ' Var Number A'
> (split name)

Behaviourin 3.5.7 rc1
   1	 ar umber
Comment 7 Cor Nouws 2012-10-06 20:53:33 UTC
though resulsts vary (looks as if there is some random wildcard in the code ;-) ) it is a regression indeed
Comment 8 Winfried Donkers 2012-10-08 05:57:01 UTC
problem still present in 3.6.2.2, Windows XP and in master, openSUSE
Comment 9 Michael Meeks 2012-12-18 15:58:55 UTC
fixed in 4.0 with the re-write of the regexp engine inherited from the Apache re-base; as such will not back-port to 3.6 so I think this is as fixed as it will get.

Thanks for the report ! :-)
Comment 10 Commit Notification 2018-12-13 06:26:17 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/b0b5bcb52cca0075b25fa0e73efc710b8020f398%5E%21

uitest for bug tdf#44398

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 raal 2019-12-07 15:24:57 UTC
The test exist, set status to Verified.