[Libreoffice-bugs] [Bug 113977] Implement REGEXEXTRACT function

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Nov 22 07:22:02 UTC 2017


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

Winfried Donkers <winfrieddonkers at libreoffice.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

--- Comment #2 from Winfried Donkers <winfrieddonkers at libreoffice.org> ---
(In reply to Xisco FaulĂ­ from comment #1)
> @Winfried, what do you think ?

There is no REGEXEXTRACT function defined in ODFF nor is it in Excel, so  it's
clearly an enhancement request.
Personally I am both attracted by the request and reluctant to be enthusiastic.

At first sight it looks like a proper enhancement, one function that with regex
can extract the most wonderful parts out of a text string.

However I see some aspects that reduces its usefulness:
-regular expressions are not everybody's cup of tea. This makes the function
only useful to a very small group of users;
-Calc has a setting (in preferences) in which wild cards or regular expressions
can be selected to be used in function arguments. This request is limited to
regular expressions only and thereby somewhat conflicts with the wild
card/regex setting;
-As the function is neither in ODFF nor in Excel, it will be incompatible with
other applications where LibreOffice strives for optimal interoperability with
other applications;
-Calculations (including those on text strings) tend to look very complex when
the calculation goes further than just one simple calculation. This can be
avoided by using more than one step (in the example in the description cells A2
and A3 can be used to make the formula in A4 much simpler: '=MID(A1;A2;A3-A2)',
and the formula in A3 can be reduced to '=FIND(",", A1, A2)'). Creating new
functions that combine other functions will only be useful if there is a common
need for them. Otherwise there will be thousands of 'combination functions',
each hardly used and very hard to to find the exact function a user has a need
for. Right now there are already too much variations of functions (e.g. FIND
and SEARCH) that confuse users and makes it hard to select the 'best' function.
In programming it is the same: with some standard functions an almost infinite
amount of functionalities can be programmed; only functionality that is widely
used is put into a separate function. The complexity is the same too, a piece
of code can be divided into easy to understand chunks or be written in a single
line (that can only be deciphered by the programmer him/herself, provided (s)he
remembers the clues).
-A macro can provide the same functionality and be exactly suited to the user's
need.

Well, these are my thoughts, with 'my' meaning personal.

The enhancement request is clear, so I set the status to new.
@Dan : should you wish to do this yourself, LibreOffice has a mentor for those
new to developing for LibreOffice. I can help you with some code pointers as
well. The number of developers with both knowledge of the Calc code base and
time available for enhancements like REGEXEXTRACT is very small, so it may take
a long time before anyone picks this up.

-- 
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/20171122/cfe919f8/attachment-0001.html>


More information about the Libreoffice-bugs mailing list