MySQL support for regular expressions is very limited, but you can try with a combination of SUBSTRING_INDEX and REPLACE string functions, like this:
UPDATE tablename
SET
url =
CONCAT(
'http://my.domain.com/wordpress/wp-content/uploads/',
REPLACE(
REPLACE(
SUBSTRING_INDEX(
SUBSTRING_INDEX(url, '/', -3),
'-',
3),
'temp-',
''),
'-',
'/'),
'/',
SUBSTRING_INDEX(url, '/', -1));
But you need to make sure that all strings have the same format. Please see fiddle here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…