LibreOffice supports Like operator [1], when using Option Compatible or Option VBASupport. Consider this code: Sub TestLike() MsgBox "!" Like "[.!?]" MsgBox "^" Like "[.!?]" End Sub In MS VBA, it produces "True" first, and then "False". In LibreOffice, it produces "False" first, and then "True". This is because character "!" should mean negation, only when it's the first character in the group; in other positions, it matches itself. Code pointer: function VBALikeToRegexp in basic/source/runtime/runtime.cxx, which should only check for "!" immediately after "[", and not in other positions. [1] https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/like-operator
Reproduced: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 29c2bba1f3ef216d226c97197185066880fc1ab5 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded
Also reproduced: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: f5c466502a302b8e56486119e5e318fb02b479fe CPU threads: 12; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-US (en_US.UTF-8); UI: en-US Calc: CL threaded I'm new to libre and want to join the community, so I'd like to work on this issue.
Baole Fang committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e12fff12b66561bc46a0e22f58919efa443e7e17 tdf#152690: Fix "!" behavior when it is not the first in a group It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Baole Fang committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d34a3c92eb68b7f0b2cef698639a2853e19a898f tdf#152690: Refactor fix It will be available in 7.6.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.