How to use space as delimiter

with cut function can i use space as delimiter ??

string = “rubence this is my name”

i want name = rubence

Set(name=${CUT(${string},’ ',1)})

this is not working …

i can do it in perl script

but i dont understand to get $str value from dialplan and how to give two variables $name and $message back to dialplan . i found i can do it through agi but can anyone please help me how to use agi for this job ??


use this :

[quote]Set(varfoo=rubence this is my name)
Set(cutfoo=${CUT(varfoo,\ ,1)})[/quote]


so , Set(name=${CUT(${string},’ ',1)}) < ---- invalid

Set(name=${CUT(string, ,1)}) <---------- valid and working

still, i’ll appreciate if anyone can help me how to do this with agi