use strict; use warnings; use Regexp::Common; $_ = '10,101,110.11010110 '; local $, = "\n"; print /($RE{num}{real})/g; #### 10 101 110.11010110