start = 0;
string_length = trivia_contents.length;
while (start <= string_length) {
start = start+1;
trivia_fragment = trivia_contents.substr(start,1);
if (trivia_fragment eq '*') {
trivia_rebuild = trivia_rebuild && '&';
} else {
trivia_rebuild = trivia_rebuild && trivia_fragment;
}
}

_________________
the gist of it is that i'm rebuilding the variable 'trivia_contents' into 'trivia_rebuild' while changing the character '*' into '&'.

but it doesn't seem to work...can someone find what's wrong?