- or download this
use warnings;
use strict;
...
__DATA__
1.234 5.6789 -1.235-4
1.234 5.6789-12.235-4
- or download this
(1.234, 5.6789, -1.235, -4)
(1.234, 5.6789, -12.235, -4)
- or download this
$ perl -MRegexp::Common=number -nle '$,=" ";print/$RE{num}{decimal}/g'
+ input.txt >output.txt
- or download this
$ perl -MRegexp::Common=number -pe 's/(?>$RE{num}{decimal})\K(?=$RE{nu
+m}{decimal})/ /g' input.txt >output.txt