[MySQL] Load data from .csv applying regex before insert into table
- by Gabriel L. Oliveira
I know that there is a code to import .csv data into a mysql table, and I'm using this one:
LOAD DATA INFILE "file.csv" INTO TABLE foo FIELDS TERMINATED BY "," LINES TERMINATED BY "\\r\\n";
The data inside this .csv are lines like this example:
08/e0/Breast_Cancer_Res_2001_Nov_2_3(1)_55-60.tar.gz Breast Cancer Res. 2001 Nov 2; 3(1):55-60…