- :
select concat(left(val, locate('== Gallery == ', val) - 1),
substring(val, locate('==Source==', val) + 10)
)
, .
update :
update `wiki_article_revisions`
set `opcode` = concat(left(opcode, locate('== Gallery == ', opcode) - 1),
substring(opcode, locate('==Source==', opcode) + 10)
);