Combine multiple lines in single line

This is related to one of my previous post but now with a slight difference: I need the "Updated:" to be in one line as well as the "Information:" on one line as well. These are in multiple lines right now as seen below. These can have 2 or more lines that needs to be in one line.

System name: xxx_yyy
Information: this is just a sample
file for this testing
today
Updated: This is not
updated
System name: testing_123
Information: another testing
Updated: No new update for this 
system name.
System name: abc_12333
Information: another testing again
and again
Updated: This has been updated
with new information

There are hundred lines with the above pattern.

Result:

System name: xxx_yyy
Information: this is just a sample file for this testing today
Updated: This is not updated
System name: testing_123
Information: another testing again
Updated: No new update for this system name.
System name: abc_12333
Information: another testing again and again
Updated: This has been updated with new information
sed '
  :loop
  $b
  N
  /: .*\n.*: /{
    P
    s/.*\n//
    b loop
   }
  s/ *\n */ /
  b loop
 '

Narrative: This is what I call a sed looper, reading it's own lies after the first rather than exiting the script at the end to get the next line:

  1. declare a branch target 'loop',
  2. if last line, print and exit,
  3. If the two lines in the buffer each have ': ', print out the first line and go back to 'loop' to get another line.
  4. Remove the linefeed and any adjacent spaces in favor of a single space.
  5. Go back to 'loop' to get another line.

Or with awk...

nawk -F : -f my.awk my.txt

my.awk

BEGIN {
        line=""
}

{

        if ( $1 == "System name" ||  $1 == "Information" ||  $1 == "Updated" ) {
                if ( length(line) > 0 ) { print line }
                line = $0
        } else {
                line = sprintf("%s %s", line, $0)
        }

}

END {
        print line
}
awk '/: /{if(NR>1)print p;p=$0;next}{p=p FS $0}END{print p}' infile

you really are a genius! I wanted to learn more in this as im using this kind of text editing frequently. Do you know any reference on this kind of sed function where i can learn more?

sed -n '/:/{x;1!s/\n/ /g;1!p;d;};H;${g;s/\n/ /g;p;}' infile
echo `sed 's/^\(.*\):/|\1:/' input | tr -d '\n'` | sed 's/^|//' | tr '|' \\n
sed -n '1h;1d;/:/ba;H;$!d;:a;x;s/\n/ /g;p;' infile

I believe everyone is entitled to beautified code -- it prevents mistakes. A sed looper should not try to filter-transform, because lines arrive in two or more places. You can just pipe one sed to the next. The big trick to sed is regex, learning how to tame the hungry wild card .* by either tying it to the end of line to find the first: ' .$' or by using a value-restricted list: '^[^ ] '. Then you can delineate the area you need to substring with \(\) which become \1-\9. The regex skills are useful in vi, ex, C/C++, PERL, awk, ksh command line editing. The regex meta-character set varies by situation and age/source of library, expanding in sed in one direction and in egrep in another direction. You can find the basics here with man regex or search regex. The more complicated regex extensions fill many web age articles. Here is an advanced regex dedicated site:

Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns