Bug Hunting Session
Bug 78840 - Add the regular expression (?ismwx-ismwx: ... ) Flag settings. Evaluate parenthesized expression with specifics flags enabled or -disabled. To have a case sensitive mode in functions using regular expressions.
Summary: Add the regular expression (?ismwx-ismwx: ... ) Flag settings. Evaluate paren...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: Find-Search
  Show dependency treegraph
Reported: 2014-05-17 21:35 UTC by m.a.riosv
Modified: 2019-08-30 11:17 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:

Sample file to test (26.62 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-17 21:35 UTC, m.a.riosv

Note You need to log in before you can comment on or make changes to this bug.
Description m.a.riosv 2014-05-17 21:35:31 UTC
Created attachment 99252 [details]
Sample file to test

Currently is not possible search in functions using regular expression in a case sensitive mode, the finder has their own option for it.


e.g. =COUNTIF(B$1:B$4;"x") find all 'x' in the range no matter their case.

In the icu regular expression operators (http://userguide.icu-project.org/strings/regexp) there is:

(?ismwx-ismwx: ... ) Flag settings. Evaluate the parenthesized expression with the specified flags enabled or -disabled.
(?ismwx-ismwx) 	Flag settings. Change the flag settings. Changes apply to the portion of the pattern following the setting. For example, (?i) changes to a case insensitive match.

But those seem don't work. I guess they aren't implemented.

'i' is the flag for the case insensitive mode:


(?-i) should deactivate case-insensitive mode, so the formula should find only lower case 'x', but it is not the result.
Comment 1 Joel Madero 2015-03-11 18:08:17 UTC
Talked to the dev room and they say this is valid - although might confuse users with yet more options.

As such marking as NEW.

Also got this from one of the devs: "well a workaround would be to use \uXXXX (see https://help.libreoffice.org/Common/List_of_Regular_Expressions )" -- no clue what that means but maybe it'll help those who are interested.
Comment 2 Eike Rathke 2015-03-11 18:16:01 UTC
Well, "valid request" doesn't mean it would come easy.. it would be yet another option in the calculation settings confusing more users, rework how text is fed to the regex matcher (with or without ignore-case transliteration), and last but not least would have to be stored in the document, yet another ODF extension I presume.
Comment 3 m.a.riosv 2015-03-11 20:14:15 UTC
Thanks a lot for take a look.

I think the workaround entering the character unicode can cover well with a few characters to find.

By Eike answer seems that search and replace text it's analyze and transformed before it is passed to regex matcher, so this can imply a high effort for a little benefit.

Maybe if a regex expression could be used directly without any transformation, but sure it's also not an easy garden to cut.

For me no problem on closing the request.