in reply to Splitting string using two overlapping patterns

And the 6th way to skin the cat:
while ($str =~ m/{(.+?)}|([\w:]+)/g) { print $+; }
.+? is a non-greedy match-anything. $+ is last captured group.