<div dir="ltr">POSIX solution more preferable and works for me.<div>Thank you, Dmitri!</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-01 1:28 GMT+03:00 Dmitri Savolainen <span dir="ltr"><<a href="mailto:savolainen@erinaco.ru" target="_blank">savolainen@erinaco.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, Andrey.<div><br></div><div>for PCRE there is module <a href="http://kamailio.org/docs/modules/devel/modules/regex.html" target="_blank">http://kamailio.org/docs/<wbr>modules/devel/modules/regex.<wbr>html</a></div><div>and this should works</div><div><br></div><div>modparam("regex", "pcre_caseless", 1)<br></div><div>....</div><div>if (pcre_match("$mb", "<span style="font-size:12.8px"> </span><span style="font-size:12.8px">$shtitval(i1)</span>")) {</div><div>....</div><div>}</div><div><br></div><div><br></div><div>also with POSIX</div><div> if ($mb =~ <span style="font-size:12.8px"> </span><span style="font-size:12.8px">$shtitval(i1)</span> ){</div><div>}</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">2018-01-31 14:42 GMT+03:00 Andrey Deykunov <span dir="ltr"><<a href="mailto:deykunov@gmail.com" target="_blank">deykunov@gmail.com</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi,<div><br></div><div>I have an htable containing some black list words (i.e. user IDs or phone models). To find matches of the words in every message I use the following script:</div><div><br></div><div><div>sht_iterator_start("i1", "black_list");</div><div>while(sht_iterator_next("i1")) {</div></div><div> if ( search($shtitval(i1)) ) {<br></div><div><div> // do something</div></div><div> }</div><div>}</div><div>sht_iterator_end("i1");<br></div><div><br></div><div>How can I modify <span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">search($shtitval(i1)</span>) to get case insensitive matching?</div><div><br></div><div>The example below does not work:</div><div><br></div><div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">sht_iterator_start("i1", "black_list");</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">while(sht_iterator_next("i1")) {</div></div><div> $var(re) = $shtitval(i1) + "/i";</div><div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"> if ( search($var(re)) ) {<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><div> // do something</div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"> }</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">}</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">sht_iterator_end("i1");</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;text-decoration-style:initial;text-decoration-color:initial">Other possible modifications of $var(re) aren't working too.</div></div><div><br></div><div>Thanks,</div><div>Andrey</div></div>
<br></div></div>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org" target="_blank">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/cgi<wbr>-bin/mailman/listinfo/sr-users</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div class="m_-1361345671142268359gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div>Savolainen Dmitri</div></div></div></div></div>
</font></span></div>
<br>______________________________<wbr>_________________<br>
Kamailio (SER) - Users Mailing List<br>
<a href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a><br>
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer" target="_blank">https://lists.kamailio.org/<wbr>cgi-bin/mailman/listinfo/sr-<wbr>users</a><br>
<br></blockquote></div><br></div>