Need help with sed command

Hi gurus,
I have a requirement where I need to parse a string for a pattern and drop it if that pattern occurs. Here's my requirement:

Input data:

record start
  string("|" ) number = NULL("");
  date("YYYYMMDD")("|") start_date = NULL("");
  decimal("|") type  = NULL("");
  string("\n") name = NULL("");
end;

My output that I need is :

string number
date start_date
decimal type
string name

So basically I need to output just the column type and column name in my output. I dont care if the delimiter b/w two fields is a space or pipe or anything... I was trying to use sed and drop the pattern start from ( till ) and print first two fields but it didnt work.

Any help is appreciated.
Thanks,
Carl

This should work, if your sed implementation recognizes re-interval {n, m}:

sed -n '
  s/^ *\([^(]*\)\(([^)]*)\)\{1,\} *\([^=]*\).*/\1 \3/p
  ' infile

If this doesn't work, try Perl:

perl -lne'
  /^\s*([^(]*)(?:\([^)]*\)\s*)+\s*([^=]*)/ and
    print "$1 $2"
  ' infile 
[house@leonov] cat data | sed 's/ //g' | awk -F "[()=]" '{if (NF>6) {print $1,$5} else {print $1,$3}}'
string number
date start_date
decimal type
string name

Thank you both for your solutions.

linux$ sed 's/= NULL.*//;s/(.[^ \t]* *)//;/record\|end/d' file