N
N
Nohaga2020-05-17 17:05:14
MySQL
Nohaga, 2020-05-17 17:05:14

How to replace by regular expression in database?

I want to translate all images on a wordpress site into webp format (I tried plugins, they are all buggy).
I converted the files, and I want to replace all jpg permissions with webp in the database, but it’s just that when I change .jpg to .webp, the site starts to fail, something else changes somewhere.
It is necessary to replace the type "*/uploads/*.jpg" with "*/uploads/*.webp" by mask, how can this be done? Quotes are also taken into account. What would change only the path to the files from the folder with the picture.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lazy @BojackHorseman MySQL, 2020-05-17
Tag

REGEXP_REPLACE()
isn't just a filter in the original request enough to cut off unnecessary replacements?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question