<p></p>
<blockquote>
<p dir="auto"><a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/btriller/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/btriller">@btriller</a> - looking again at this one, wouldn't it be the same to do:</p>
<pre><code>subst_hf("X-My-Header", "/^(.+)$/prefix \1/", "a");
subst_hf("X-My-Header", "/^(.+)$/\1 suffix/", "a");
</code></pre>
<p dir="auto">instead of:</p>
<pre><code>subst_hf("X-My-Header", "/^/prefix /", "a");
subst_hf("X-My-Header", "/$/ suffix/", "a");
</code></pre>
</blockquote>
<p dir="auto">Knowing that</p>
<pre><code>% echo blub|sed 's/^/prefix /'
prefix blub
% echo blub|sed 's/$/ suffix/'
blub suffix
</code></pre>
<p dir="auto">works, it felt weird to write</p>
<pre><code>subst_hf("X-My-Header", "/^(.)/prefix \1/", "a");
subst_hf("X-My-Header", "/(.)$/\1 suffix/", "a");
</code></pre>
<p dir="auto">As most of the time, there are other ways to do it (above suggested or <code>remove_hf()</code>, looping over all headers and <code>append_hf()</code>).<br>
I understand the concerns, so I don't mind if the PR is closed.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/kamailio/kamailio/pull/2869#issuecomment-987959909">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABO7UZMCC2GHXFFRPJOFGDDUPYITHANCNFSM5FLMRBQA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/ABO7UZJW35IZI3X7U2O2UWLUPYITHA5CNFSM5FLMRBQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHLRREZI.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/kamailio/kamailio/pull/2869#issuecomment-987959909",
"url": "https://github.com/kamailio/kamailio/pull/2869#issuecomment-987959909",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>