in reply to Alternating Integers and Commas in Regex

Perhaps a two-stage split rather than a regex?

$ perl -Mstrict -Mwarnings -E ' my $str = q{Klhl21 NM_001033352 chr4 + 152008890 152017677 152008942 1 +52015628 4 152008890,152012299,152014306,152015334, 152009963,1520127 +05,152014379,152017677,}; say for map { split m{,} } split m{\s+}, $str;' Klhl21 NM_001033352 chr4 + 152008890 152017677 152008942 152015628 4 152008890 152012299 152014306 152015334 152009963 152012705 152014379 152017677 $

I hope this is helpful.

Cheers,

JohnGG