From: Alejandro Colomar Date: Wed, 5 Nov 2025 16:29:05 +0000 (+0100) Subject: src/bin/grepc_c: -tum: Split regex part for the replacement list X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f5569e29cc15e93a9e058b202084f76daa922755;p=thirdparty%2Fman-pages.git src/bin/grepc_c: -tum: Split regex part for the replacement list While splitting, improve the regex part in two ways: - Use a non-capturing group. This improves performance. - Use negative lookahead instead of '[^\\]$'. This allows matching a macro where the searched identifier is the last thing in the replacement list. Signed-off-by: Alejandro Colomar --- diff --git a/src/bin/grepc_c b/src/bin/grepc_c index 9ca87a1ba..c752dec19 100755 --- a/src/bin/grepc_c +++ b/src/bin/grepc_c @@ -119,6 +119,7 @@ grepc_c_mf_decl_() { grepc_c_m_decl_ "$1"; grepc_c_mo_decl_() { grepc_c_m_decl_ "$1"; printf '%s' '(?!\()'; } grepc_c_m_repl_() { printf '%s' '.*?(?