PHP: Replace in file using regex pattern
one text
I have a CSV file of 1GB. in the same some of the cells having newline \n
so while calling fgetcsv()
it breaks.
So first of all I want to correct the file's data and want to replace every new line
surrounded with ""
using regex below is my regex pattern.
\".[\n[:alnum:]?\ ?\-?\,?\:?\/\.?]+."
But I don't have the idea that how to process the whole file.
Source