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.



Reply via email to