in reply to Re: Join multiple lines in a string based on regex.in thread Join multiple lines in a string based on regex.
Nice! Except the groups beginning with "unassigned" should not be printed.