in reply to reg exps


You could use a negated character class for this:     perl -i.bak -pe 's/[^\d.]//g' file

Refer to perlre and perlrun.

Or you could use tr, refer to perlop:     perl -i.bak -pe 'tr/0-9.//cd' file

Add "\n" to the regex or -l to the command line switches to preserve newlines.

--
John.