That should be:you need to use a regex
Code:
UPDATE phpbb_posts SET post_text= REGEXP_REPLACE ( post_text , '\\[quote="([^"]+)" [^\\]]+\\]' -- capturing the username, match all quotes that have more than only a username , '[quote="\\1"]' -- substitute previously captured username, dump the rest );
Code:
SELECT REGEXP_REPLACE ( post_text , '\\[quote="([^"]+)" [^\\]]+\\]' , '[quote="\\1"]' ) AS new FROM phpbb_posts WHERE post_id= ?;
Statistics: Posted by AmigoJack — Thu Jan 04, 2024 2:13 am