Why does this require two regexes? What prevents this from being a single regex with a repeated capturing subpattern?