I have to say, that is some great Regex Fu. I was looking to do
something similar but your solution is much nicer!