I've actaully been playing w/ regular expressions a bit lately. I wouldn't have thoght of using them w/ this though - this is pretty easy, after I got over my initial hurdle.
They're still a bit foreign, but after reading (and asking) here, I've gotten them to do some pretty helpful things.
Again - thanks for the wisdom