Mysql has lots of string manipulation function See here
You can use these functions in a query for example: ( very simple example )
UPDATE table SET new_field = SUBSTRING(old_field, INSTR(old_field, '<a'), INSTR(old_field, '</a>') ) WHERE id = 10;
So with the use of SUBSTRING and INSTR and maybe a few others you can develop a query to do the job.