ruby -ne 'puts$1if/(-?\d(?:\.\d+)?)/' < data > munged
Update: To everyone griping and downvoting because it's not a perl solution, if you just change five characters (not counting s/ruby/perl/) it is valid perl. Have to leave something for the people asking extremely trivial questions yet providing no code of their own to figure out on their own . . .
(Hint: you need one more command line flag and change one keyword name)
Update 2: Awww, someone spoiled the exercise for the reader.
In reply to Re: removing square brackets
by Fletch
in thread removing square brackets
by Angharad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |