That's cool. The PHP substitution code was already expressed as a regex, so I can just crib that. Thanks.