Open it with excel and save it as a comma. Treat consecutive delimiters as one, or not. Then save it with excel as csv, which will be separated by commas and will be easier to import into mysql.
EDIT: The guy who says he uses preg_split on "[+]" gives you essentially the same answer as me above.
The question is what to do after that.
Have you decided how many "string types" exist? Once you have determined this and determined their characteristics, it will be much easier to write code to go through it.
If you save it in csv, you can use the fgetcsv PHP function and its related functions. For each row, you will check its type and perform operations depending on the type.
I noticed that your data rows can be divided by whether the first data of the column contains "." so here is an example of how you can scroll the file.
while ($ row = fgetcsv ($ file_handle)) {if (strpos ($ row [0], '.') === false) {// do something} else {// do something else}}
"do something" will be something like "CREATE TABLE table_$row[0] " or "INSERT INTO table " etc.
Ok, and here are a few more observations:
Your file really looks like a few glued files. It contains several formats. Note that all lines starting with "4" have a 4-letter abbreviation for the company, followed by the full name of the company. One of them is caco. If you are looking for "caco", you will find it in several "tables" inside the file.
I also noticed that "smuwtfa" (days of the week) rained down.
Use these hints to determine the processing logic for each row.
source share