in reply to Extract the variable

In this particular case, I prefer to use split as demonstrated by EvanK. However, if you insisted on regex, specially for irregular patterns (e.g. not always ".declare"), than I would use simpler regex:
$ perl -wle '$_=shift; /\S+\s+(\S+)/ and print $1' ".declare cube_no + 9999999.999" cube_no
But still, on this "regular irregular patterns", splitting on spaces (or other possible delimiters) still wins over regex in my toolbag.
$ perl -wle '$_=shift; print +(split)[1]' ".declare cube_no 999 +9999.999" cube_no

Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!