I
I
IvanRobot2016-05-25 13:34:37
MySQL
IvanRobot, 2016-05-25 13:34:37

How to find all matches of a string in the database and delete them?

There is a site on Bitrix. Contains a fairly large volume of articles. At the end of each article is the following line:

Read the full text of the article in the journal no.

You need to delete this line in every article. Please tell me how to write sql query.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
Melkij, 2016-05-25
@melkij

Is it a one time task? Make it in your favorite programming language.
Mysql does not know how to replace regular expressions, you can pervert with string functions, in the end it is possible to write even a store and do a task, but is it worth spending more time to save some crumbs of machine time one-time?

C
cheshirerabbit, 2016-05-26
@cheshirerabbit

You need the REGEXP_REPLACE function
And either include UDF: https://github.com/hholzgra/mysql-udf-regexp
Or write something like this
www.databasejournal.com/features/mysql/in-search-o...

Z
Zhainar, 2016-05-25
@zhainar

Oh great google
stackoverflow.com/questions/14527859/sql-to-remove...

E
Express777, 2016-05-25
@Express777

In a Bitrix database with bare SQL? :)
If this is a test site, then you can....
dev.1c-bitrix.ru/learning/course/?COURSE_ID=43&LES...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question