Bug 100214 - Function MATCH() ignores "+" sign in search criterium
Summary: Function MATCH() ignores "+" sign in search criterium
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-04 09:58 UTC by TheMojoMan
Modified: 2016-06-04 10:06 UTC (History)
1 user (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 TheMojoMan 2016-06-04 09:58:53 UTC
Here is a simple test case to reproduce the bug. Cells A1 - A3 should contain the following text

A1: b-
A2: b
A3: b+

Now enter e.g. in cell B1:  =MATCH("b-";A1:A3;0)  ->  1  ->  correct
change it to:               =MATCH("b";A1:A3;0)   ->  2  ->  correct
change it to:               =MATCH("b+";A1:A3;0)  ->  2  ->  incorrect

The error appeared for me when I updated my system from Ubuntu 15.10 to Ubuntu 16.04 which now uses LibreOffice 5. Todays update to version 5.1.3.2 did not fix the problem. I am using the german version of LibreOffice, the corresponding german function reads  =VERGLEICH("b+";A1:A3;0).
Comment 1 m_a_riosv 2016-06-04 10:06:48 UTC
Hi,

the '+' is part of regular expressions used by match.
https://help.libreoffice.org/Common/List_of_Regular_Expressions

You have two options:
¬ Escape the '+' with a backslash: =MATCH("b\+";A1:A3;0)
¬ Deactivating the use of regular expression in:
  Menu/Tools/LibreOffice calc/calculate/Enable regular expressions in formulas.

Resolved as not a bug, please if you are not agree, reopen it.