my $string1 = '123456789'; my @nonlap = $string1 =~/(\d\d\d)/g; #nonlap now contains (123,456,789)