Created attachment 117794 [details] example of vlookup being confused when comparison string contains parentheses. Strings like "16GB (2x8GB) 1600MHz DDR3L [add $112.00]" confuse vlookup. The above string is used in the description of a product and so I copied it into one column and put the price in the next column. In another sheet one column is validated to contain the values from the above column. Using vlookup it should put the price next to it. However the vlookup does not find the description if it contains a parentheses like in the "(2x8GB)" above. I've attached a file showing the problem.
Hi @Ivor, thanks for reporting. But the issue it's simple. Parentheses are part of the regular expression, which are used by VLOOKUP(). You have the option to disable regular expressions for the file in: Menu/Tools/Options/LibreOffice calc/Calculate - Enable regular expressions in formulas. Then seems it works fine. If you want to use regular expression, then special characters for them must be scaped with backslash, e.g. \( and \) https://wiki.documentfoundation.org/Documentation/How_Tos/Regular_Expressions_in_Calc
Thanks. That fixed it. It seems most people would not want tricky regular expressions to interfere. And if they are advanced enough to know about them then they could turn it on. However the spreadsheet now works as expected. Thank you.
Thank you for confirmation.
I leave this bug as resolved, but I strongly support that vlookup does NOT use regex by default.. I also understand that's a difficult decision to make at this point of the project release..
Then please report a new bug as request for enhancement.