Just thought I’d let you know I appreciate you taking the time to post this – I was close (using pre_replace as opposed to str_replace) but your solution works a treat.