It works great thanks much. Only found one error which I corrected here - the if statement needed to include a closing parenthesis for the $left statement. Sub Main /if $left(1,"$target(name,clean)")=="#" { /echo $right($calc($strlen("$target(name,clean)")-1),"$tar...