tokens would work... though it'd have to be something like $fortok(<variable>,<start>,<end>,<C>,<command>)
To include an end like that could be done with the foreach mentioned in my post above:
foreach($gettok(%var,%0,32),%i) {
if (%i == 5) break;
..
}