Article 6FY3Z UPDATE REPLACE random string with same beginning and ending in MariaDB 10

UPDATE REPLACE random string with same beginning and ending in MariaDB 10

by
Aeolustw
from LinuxQuestions.org on (#6FY3Z)
Hi,
The strings:
<r>[quote name='Angel' date='Jan 5 2005, 21:36 PM']...
<r>[quote name='ABC' date='Mar 7 2005, 13:07 PM']...
<t>[quote name='DEF' date='Sep 2 2005, 22:10 PM']...

I want to replace [quote name='DEF' date='Sep 2 2005, 22:10 PM'] with <QUOTE><s>[quote]</s>
The beginning string is [quote name= and the end one is ']
And I try:
Code:UPDATE phpbb_posts SET post_text = REGEXP_REPLACE (post_text, '\[quote name=.*\'\]' , '<QUOTE><s>[quote]<\/s>') WHERE post_text LIKE '%quote name=%' ;The results data in show too many:
<r>[<QUOTE><s>[quote]</s><QUOTE><s>[quote]</s><QUOTE><s>[quote]</s>...

Ant hit?
Thanks.
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments