I need a simple ereg_replace statement written. I hate writing regular expressions.
I have a script that uploads a CSV file. When it reads a line and comes across a column value that contains a comma, it gets messed up when I explode the string. Example, lets say that the first line in the CSV file is:
tony,10-27-70,webdesigner,"2,000","And I said, Hello",charlotte,
the value in column 4 and 5 contains a comma and escaped by double quotes.
I need a regex that will remove the commas and the double quotes so it looks like this:
tony,10-27-70,webdesigner,2000,And I said Hello,charlotte,
Now when I use explode(",",$string) It will work right.