On Tue, Apr 13, 2021 at 10:52:15PM -0600, Thayne McCombs wrote:
> 
> On 4/13/21 3:44 AM, Willy Tarreau wrote:
> > I'm failing to see how it differs from regsub() which already does the
> > same with the reference (you'd write \1 instead of 1) and also allows to
> > compose something out of multiple matches. Am I missing something, or a
> > case where regsub() is really not convenient compared to this one ?
> > 
> > Thanks,
> > Willy
> 
> Mostly just convenience. It is possible to accomplish the same thing using
> something like
> `'regsub(".*(mypattern).*","\1")'`, but you need to remember to include the
> ".*" on both sides.
> I also suspect (although I haven't benchmarked it) that regmatch would
> perform better than the equivalent regsub.
> 
> That said, I do recognize that this doesn't add any completely new
> functionality, and I will not
> be offended at all if you don't think it is worth merging.

OK thanks for explaining. I'm not particularly against it, I'm fine if
others see some value in it.

Does anyone have any opinion ? Lukas, given you're the one dealing with
the most user help requests on Discourse, do you think it could simplify
certain configs or help users spot the right usage faster maybe ?

Thanks,
Willy

Reply via email to