https://bugs.documentfoundation.org/show_bug.cgi?id=147875

            Bug ID: 147875
           Summary: REGEX returns dummy empty matches for already
                    processed chunks (?)
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

Put '=REGEX("111;;222;333;555";"[^;]*";;ROW())' into A1. Drag-copy down to A10.

The expectation is that the regex will split the string into tokens separated
by ";". So expectation is:

A1 = '111'
A2 = '' (empty string)
A3 = '222'
A4 = '333'
A5 = '555'
A6 and later = '#NA'

The actual results with Version: 7.3.1.3 (x64) / LibreOffice Community
Build ID: a69ca51ded25f3eefd52d7bf9a5fad8c90b87951
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL:

A1 = '111'
A2 = '' (empty string)
A3 = '' (empty string)
A4 = '222'
A5 = '' (empty string)
A6 = '333'
A7 = '' (empty string)
A8 = '555'
A9 = '' (empty string)
A10 and later = '#NA'

So there are unexpected empty matches *after* each correct non-empty match.
Of course, the regex may be easily tweaked to workaround, e.g.

 =REGEX("111;;222;333;555";"(?<=^|;)[^;]*";;ROW())

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to