Hey Perl experts!
I need a perl script to extract only the numbers from a given text string. As simple as possible, please. I don't know if perl has something build-in or I need a regular expression to do it.
EDIT: Perhaps perl is not even the best to use for this purpose? I am not bound to use perl.
The matched numbers should be valid real numbers, but they can have all kinds of normal or tricky forms, including negative, floating point, exponential notations, as indicated by this example:
echo "foo 11 bar 2. bla -3.33 4.5e-06 text78text +9." | extract_numbers.pl
The output should be the following:
11 2. -3.33 4.5e-06 78 +9.