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\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\"\\\\\\\\"\\\\"\\"\"\">
<thead>
<tr>
<td>
<p> </p>
</td>
</tr>
</thead>
...
Problem
The problem here is that there have been a number of user copy / paste actions, where CKEditor has finally applied the \
escape character to the \
escape character and out there giving rise to which can be seen above.
Since the number of \
is different in each place and each record in the table, and given the number of records, manual resolution of this subject is impractical.
Question
How to apply a regular expression to an update query to the database, updating the description
field with the value it contains, but clearing all those escape bars, leaving only one where more than one is found?
Theoretical example:
UPDATE product
SET description = (description - milhões de barras)
WHERE 1
Not relevant, but the issue of copying and pasting clearing previously applied escape characters is already resolved on the PHP side. New records no longer cause this problem. The question is a solution in MySQL to deal with the old records already present in the database.