Tool to restructure CSV files using regular expressions