[Libreoffice-bugs] [Bug 140708] The REGEX function accepts all (ismx) but one (w) flags and only directly in the regular expression and does not allow all matches to be found at once

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Apr 12 21:26:14 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=140708

--- Comment #4 from Igor <eeigor at inbox.ru> ---
Eike Rathke,
1) At least one flag ("i") duplicates the corresponding pattern option.
E.g.
With com.sun.star.i18n.TransliterationModules
    oOptions.transliterateFlags = .IGNORE_CASE
End With

And how to use the following constants, I still do not understand:
 Const Long REG_NOT_BEGINOFLINE = 0x00000800
 Const Long REG_NOT_ENDOFLINE = 0x00001000
But this appears to be our flag "m"...

And if the analogy with Python is appropriate here, then the approach that I
described is used there, only the sequence of flags ("ismxw") as a string is
used.
https://docs.python.org/3/library/re.html

2) REGEX("barbaz";"a";;"g") returns not "aa", but an array of 2 matches {a; a},
and if one cell is selected, it will get the first value from the array
according to the array processing rule. But the user can join an array of
matches and output it as a string.
Why is this needed? In order not to iterate over the return values ​​one by one
during multiple calls to the REGEX function when the total number of matches is
unknown. To do this, you need to organize a loop and write a macro.
And if REGEX with the "g" (Global) flag replaces all occurrences, wouldn't it
be logical to extract all of them also?

-- 
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/20210412/997f5196/attachment.htm>


More information about the Libreoffice-bugs mailing list