<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div id="nine_body_n17ccab-1f0c3" class="nine_body" dir="auto" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12.0pt; line-height:1.3; color:#1F497D">
<div class="nine-pg" dir="auto">That was my understanding of how it should work as well, however in my testing it does not appear to be working that way.</div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">e.g. if there is a key of "+18884441111” in my dataset and I do $shtcn(htablename=>~%8884441111) I get a count of 0.</div>
<div class="nine-pg" dir="auto"><br>
</div>
<div class="nine-pg" dir="auto">As far as regex, I am trying to avoid that as I was told many years ago that regex is inherently slow when compared to other operations in Kamailio.  I was told this by someone I trust as an authority, and since this is a quite
 high volume system (greater than 1500 requests per second at peak load), every millisecond matters.</div>
<div class="nine-pg blank msg" dir="auto"><br>
</div>
</div>
<div class="quoted_output_body">
<div id="quoted_header_n17ccab-1f0c3" class="quoted_header_editor" dir="auto">
<hr style="border:none; height:1px; color:#E1E1E1; background-color:#E1E1E1">
<div dir="auto" style="border:none; padding:3.0pt 0cm 0cm 0cm"><span style="font-size:11.0pt; font-family:Calibri,Arial,Helvetica,sans-serif"><b>From:</b> ‪M S‬ <shaheryarkh@gmail.com><br>
<b>Sent:</b> Thursday, October 28, 2021 5:16 PM<br>
<b>To:</b> Brooks Bridges; Kamailio (SER) - Users Mailing List<br>
<b>Subject:</b> Re:[SR-Users] htable shtcn expressions<br>
</span></div>
</div>
<br type="attribution">
</div>
<div>
<div dir="auto">Per my understanding, the left prefix match means the name "starts with" given prefix, while the right prefix match means the name "ends with" given prefix.
<div><br>
</div>
<div>$sht(a=>aac) = 1;</div>
<div>$sht(a=>abc) = 1;</div>
<div>$sht(a=>acc) = 1;</div>
<div>$sht(a=>adc) = 1;</div>
<div><br>
</div>
<div>...</div>
<div><br>
</div>
<div>// both will produce same output</div>
<div>xlog("$shtcn(a=>a.*)");</div>
<div>xlog("$shtcn(a=>%~a)");</div>
<div><br>
</div>
<div>// both will produce same output</div>
<div>xlog("$shtcn(a=>.*c)");</div>
<div>xlog("$shtcn(a=>~%c)");</div>
<div><br>
</div>
<div>I usually use regex whenever possible and avoid these fancy derivatives to keep things simple and easy to understand in kamailio config.</div>
<div><br>
</div>
<div>Hope this helps.</div>
<div><br>
</div>
<div>--</div>
<div>Muhammad Shahzad Shafi</div>
<div>Tel: +49 176 99 83 10 85</div>
<div><br>
<br>
Sent from my Huawei P40 5G phone</div>
</div>
<div style="line-height:1.5"><br>
<br>
-------- Original message --------<br>
From: Brooks Bridges <bbridges@call48.com><br>
Date: Thu, 28 Oct 2021, 23:26<br>
To: "Kamailio (SER) - Users Mailing List" <sr-users@lists.kamailio.org><br>
Subject: [SR-Users] htable shtcn expressions<br>
<blockquote>Referring to the expressions outlined at http://www.kamailio.org/wiki/cookbooks/5.4.x/pseudovariables#shtcn_htable_exp , is there any additional documentation or examples floating around that further explains how the right and left prefix matching
 works?  The rest of them are pretty clear, but I'm having troubles with these and can't get them working like I would expect them to work.<br>
Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail. If the reader of this e-mail is not the intended recipient, or the
 employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your
 system.<br>
<br>
__________________________________________________________<br>
Kamailio - Users Mailing List - Non Commercial Discussions<br>
  * sr-users@lists.kamailio.org<br>
Important: keep the mailing list in the recipients, do not reply only to the sender!<br>
Edit mailing list options or unsubscribe:<br>
  * https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users<br>
</blockquote>
</div>
</div>
Confidentiality Notice: This e-mail, and any attachment to it, contains privileged and confidential information intended only for the use of the individual(s) or entity named on the e-mail. If the reader of this e-mail is not the intended recipient, or the
 employee or agent responsible for delivering it to the intended recipient, you are hereby notified that reading this e-mail is strictly prohibited. If you have received this e-mail in error, please immediately return it to the sender and delete it from your
 system.
</body>
</html>