in reply to Regexp to extract groups of numbers
You are using the wrong tool for breaking up fixed width fields.
$s = '000000000000022102840002210284'; print unpack '(a10)*', $s; 0000000000 0002210284 0002210284
If there is any doubt that the data will only contain digits, verify that with $s =~ m[^\d+$]; first.
|
|---|