Well, doesn't this look rather like a homework question to you??? Of course I know that solution doesn't solve the problem. I was just giving him an idea of how to tackle the problem, not to give him a staight answer. I think OP is doing it that way (using slurp and regular expression) for a reason. ;-)