Re: [SR-Users] Kamailio number of matches of specific character in a string

2015-06-18 Thread Kristian F . Høgh
Hi, This might get you started: $var(test1)="bbbaddaa34"; $var(test2)=$(var(test1){s.replace,a,});# replace "a" with nothing $var(a)=$(var(test1){s.len}); $var(b)=$(var(test2){s.len}); $var(c)=$var(a) - $var(b); xlog("$var(a), $var(b), $var(c)"); ERROR:

[SR-Users] Kamailio number of matches of specific character in a string

2015-06-18 Thread Ali Taher
Hello, I just need to count the number of a specific character in a string. For example I want to count the number of "a" in the following string : "bbbaddaa34" I searched among transformations but didn't find such tool. Any help would be appreciated. Thanks Ali _