I
How to remove the stray commas (in bold) from inside the quotation marks and leave the delimiters?
The above code also removes the last character
$newstring = "name","first nam","mothers name","maiden nam"
Code:
$string = '"name","first name,","mothers name","maiden name,"';
$newstring = preg_replace('/\w\,\"/','"',$string);
How to remove the stray commas (in bold) from inside the quotation marks and leave the delimiters?
The above code also removes the last character
$newstring = "name","first nam","mothers name","maiden nam"