Clarify 'regexp-opt' match ordering

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Clarify 'regexp-opt' match ordering

Mattias Engdegård-2
As mentioned elsewhere, 'regexp-opt' normally returns a regexp that always matches the longest string in the given list if more than one could match. This is not documented, but it seems very likely that callers often rely on this behaviour even if they don't actually give it much thought.

In other words: it's a behaviour that is useful and cannot be changed, so it should be documented properly. Proposed patch attached.


0001-More-precise-regexp-opt-documentation.patch (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Clarify 'regexp-opt' match ordering

Mattias Engdegård-2
16 dec. 2019 kl. 11.54 skrev Mattias Engdegård <[hidden email]>:

> In other words: it's a behaviour that is useful and cannot be changed, so it should be documented properly. Proposed patch attached.

Pushed; there isn't much more to say about it.