in reply to Simple Regex
Thanks, everyone. Combined, you've given me enough to go on to solve the problem myself, which is the way it should be.