[OpenSIPS-Users] re.subst usage

Barnaby Ritchley barnyritchley at hotmail.com
Wed Jul 29 12:44:12 EST 2020


Hi List,
 
Using below in route:
 
$var(reg) = "/\+?\d{5}([1-9]\d+)/\1/g";
$var(to_user) = $(rU{re.subst,$var(reg)});
 
With $rU of 12345441234567890 we would expect $var(to_user) to be 441234567890 (stripping off the first 5 digits) however $var(to_user) returns 12345441234567890
 
What am I doing wrong?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20200729/bd3a9724/attachment.html>


More information about the Users mailing list