I made a mistake in a app I'm developing and it turns out that there are some text that have multiples times double quotes escaped, something like this
We will begin by constructing the front and sides of the bar. We will first create frames for both the front and sides using 2\\\\\\\\" x 4\\\\\\\\"s and will then secure particle board panels over the frames. The bar in this project is 42\\\\\\\\" tall by 60\\\\\\\\" wide by 40\\\\\\\\" deep. You will be drilling several screws in this project. To make this process easier- first drill pilot holes for the screws in your frame using your Dremel Rotary Tool and a 150 1/8\\\\\\\\" Drill Bit.
I'm looking for a way to do an update in the DB that remove all those slashes quickly, so far my thinking is to use a regular expression, something like
for each($records as $record){
$record->description = preg_replace(*/some patter here/*, $record->description);
$record->save();
}
However I'm having a hard time looking for the correct pattern, so maybe someone can please help with this, or if there is a easier or better way to updates these records, I really appreciate any help!