Answer the question
In order to leave comments, you need to log in
Is implicit substitution possible in sql query?
There is a Mysql database site on Wordpress
The above for some reason added extra tags to the saved posts of which there are a lot (about 1500) the site of the online store I would like to remove colors of this kind: <span style="color: #303030;">
by replacing them with just I <span>
thought about such a request:
UPDATE ds_posts SET post_content = REPLACE(post_content, ' style="color: #'[000000-999999]+';"', '')
Answer the question
In order to leave comments, you need to log in
Regular expressions are not supported in REPLACE. It is recommended to use this package , but I do not think that this option will suit you. Try to change not on the side of the database, but with some script, for example. Consider two points:
1. Do not forget about the backup.
2. Regular color for RGB: #?([a-f0-9]{6}|[a-f0-9]{3}) .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question