If you use the match function and the text strings contain brackets "(" or ")" then no match will be found. This is with match type=0. If the brackets are converted into, e.g. "_", in both search & table using convert then the text matches. Other types of brackets not tested. Other types of special characters not tested.
I don't know what the proper procedure is here, but I would like to contribute the following additional information to this bug report: Formula error: Search strings containing parenthesis and bracket characters fail to return a match, i.e., the following characters do not work as search criteria: ( ) [ ] e.g., if cell A1 contains: this (is) [a] test and cell A2 contains: =COUNTIF(S7,"this (is) [a] test") the result of A2's formula is returned as 0 when is should be 1. Escaping the characters with single quotes gave the same result, e.g.: =COUNTIF(S7,"this '('is')' '['a']' test"). This behavior is present for both literal and referenced strings. I found this with the COUNTIF and VLOOKUP functions, but would speculate that it is probably effecting any or most database, reference, lookup, search and some mathematical functions. The following characters do seem to work and might be used in workarounds: angle and curly brackets, i.e., < > { } I tested this using Mac OS X 10.5.8 on a G5 Power PC (PPC) platform running LibreOffice LibreOffice 3.4.3, OOO340m1 (Build:302)
Correction, browser crashed and I missed this on the retype, sorry: My formulas above should have a cell argument of A1 not S7: .... and cell A2 contains: =COUNTIF(A1,"this (is) [a] test") the result of A2's formula is returned as 0 when is should be 1. Escaping the characters with single quotes gave the same result, e.g.: =COUNTIF(A1,"this '('is')' '['a']' test"). ....
*** Bug 42397 has been marked as a duplicate of this bug. ***
Please read the help carefully: "The search supports regular expressions. You can enter "all.*", for example to find the first location of "all" followed by any characters. If you want to search for a text that is also a regular expression, you must precede every character with a \ character. You can switch the automatic evaluation of regular expression on and off in Tools - Options - LibreOffice Calc - Calculate. " Brackets have a special meaning in regular expressions. You are likely want to turn regular expressions off.
No bug.
@Regina Henschel OK, you are right. For all users: turn off the option Tools > Options... > LibreOffice Calc > Calculate > Enable regular expressions in formulas, if you don't want to use regex.
How about changing the default to NOT have regex enabled ... for the people like me who didn't make the connection between regex and normal text matching, this would help. I didn;t even know that regex was enabled by default ... The people who want to use regex will turn it on and can be expected to understand the implications of doing so (or a warning can be added in the appropriate place) ... For me, this setup is totally opaque ...
Why not add a function to explicitly tell libreoffice that a text is a regular expresion? (even if it's not checked in configuration). I'm sure that even people that uses regex don't use it on more than a few cells per sheet, right? So, interpreting all text in the whole sheet as regex causes trouble and compatibility issues. There could be a Regex() function that explicitly tells LibreOffice that the text inside it is a regex. So, you use regex only when you need it, and don't cause chaos with all the rest of the text on every sheet. Then, you don't need to check "Enable regular expressions in formulas" ever again in your life. What do you think?
(In reply to Fernando from comment #8) https://help.libreoffice.org/6.3/en-US/text/scalc/01/func_regex.html