perl -wlpe "use strict; my $quo = qq(\042); my $esc = qq(\\\\); my $body = qr/[^$quo$esc]/; my $escaped = qr/$esc ./x; my $sep = qr/ \s* , \s* | \s* \Z /x; my $quoted = qr( $quo $body* (?: $escaped $body* )* $quo )x; my $number = qr(\d+); $_ = join '|', m/( $quoted | $number ) (?= $sep )/gx" NSRLFile.csv > NSRLfile.psv