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: <script>: 10, 7, 3

 

Regards,

Kristian Høgh

uni-tel A/S

 

 

On Thursday 18 June 2015 13:44:57 Ali Taher wrote:

> 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

>

>

>