in reply to Data::Types or grok_number
Here's another option using Regexp::Common:
use strict; use warnings; use Regexp::Common qw/ number /; print for grep /^$RE{num}{int}$/, <DATA>; __DATA__ 3.14 10 -42 42 .14159 12.34e-56 3.0 Hello, world.
Output:
10 -42 42
|
|---|