So, guess what! @imathis (the true Regexp god) fixed everything: http://rubular.com/r/kmNhn2806o