Yep, good one - didn't occur to me to use hex to avoid the replaces :P much simpler now, thanks!