Skip to content

Instantly share code, notes, and snippets.

@house9
Created April 29, 2012 18:44
Show Gist options
  • Save house9/2552587 to your computer and use it in GitHub Desktop.
Save house9/2552587 to your computer and use it in GitHub Desktop.
-- changes [email protected] -> [email protected]
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment