[Libreoffice-bugs] [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.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Dec 21 09:22:42 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=78840
--- Comment #13 from Mike Kaganski <mikekaganski at hotmail.com> ---
i18npool/source/search/textsearch.cxx
TextSearch::setOptions2 handles rOptions.transliterateFlags and initializes
xTranslit for IGNORE_CASE. Then it calls RESrchPrepare, where it adds
UREGEX_CASE_INSENSITIVE to nIcuSearchFlags. Then in
searchForward/searchBackward it uses the transliteration service to get
lowercase version of original string, thus making regex engine unable to make
reasonable use of (?-i) flag.
There's a comment in TextSearch::RESrchPrepare:
> // Note that the search flag ALL_IGNORE_CASE is deprecated in UNO
> // probably because the transliteration flag IGNORE_CASE handles it as well.
So maybe in case of regex search, transliteration service should not be
used/should do nothing? The UREGEX_CASE_INSENSITIVE should already do the
trick?
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191221/080a79ff/attachment.htm>
More information about the Libreoffice-bugs
mailing list