Answer the question
In order to leave comments, you need to log in
How to delete in MYSQL database everything between two tags?
Hello.
There is a site on wordpress on which there are a lot of posts containing
<nav>много разного текста включая разные html теги</nav>.
<nav></nav>
either through a sql query or through a plugin?
Answer the question
In order to leave comments, you need to log in
/^\S+$/
add to yours /^[a-zA-Z0-9]+$/
?
yours doesn't "allow" spaces anyway, if anything
https://regex101.com/r/6gPPHH/1
https://regex101.com/r/ojb6TT/1
Well, something like this:
update test
set html = replace(
html,
substr(
html,
locate('<nav>', html, 1) + 5,
locate('</nav>', html, locate('<nav>', html, 1))-locate('<nav>', html, 1) - 5
), '');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question