-- changes joe.smith@gmail.com -> joe.smith@qa.com
update users set email = replace(replace(regexp_matches(email, '.*@')::varchar, '{', ''), '}', '') || 'qa.com';

-- there must be a better way to get rid of the {} chars returned by regexp_matches