Your regex works on short test strings but grabs way more than you wanted on real data. It's almost always a greedy quantifier — here's the actual fix, with the exact character-by-character reason it happens.