[OpenSIPS-Users] Question about regex

Bogdan-Andrei Iancu bogdan at opensips.org
Mon May 18 20:39:21 EST 2020


Hey Michael,

Maybe this {ip.isprivate} is a better options:
     https://www.opensips.org/Documentation/Script-Tran-3-1#toc80

Regards,

Bogdan-Andrei Iancu

OpenSIPS Founder and Developer
   https://www.opensips-solutions.com

On 5/18/20 8:29 PM, Saint Michael wrote:
> I need to identify all private IPs vs public IPs
> Right now I am doing
> $rd =~ "192.168" || $rd =~ "10." || $rd =~ "172.16."
> but in regex there is a faster way, chaining several ORs
> like
> $rd =~ "192.168|10.|172.16."
> what is the correct way to do this in opensips?
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200518/0941985e/attachment-0001.html>


More information about the Users mailing list