I have the following CSV data:
1,2,3,4,5,6,7,8,9,10
,,,,,,,,,
1,2,3,4,5,6,7,8,9,10
1,2,3,4,5,,,,,
,,,,,,,,,
,,,,,,,,,
,,,,,,,,,
And I'm using the the following regex pattern to remove blank lines at the end of the CSV: [,\s]+$
The issue is that this captures the empty columns in the fourth line too (1,2,3,4,5,,,,). How can I avoid this?
After removing the match, the desired output should be the following:
1,2,3,4,5,6,7,8,9,10
,,,,,,,,,
1,2,3,4,5,6,7,8,9,10
1,2,3,4,5,,,,,