netfrugal Posted November 3, 2006 Share Posted November 3, 2006 In my database I have a ton of emails that I want to change:For example:mommy@yahoo.com to mommy@mydomain.comdad@hotmail.com to dad@mydomain.comuncle@msn.com to uncle@mydomain.comsister@gmail.com to sister@mydomain.comI am sure there is a search and replace for mysql that can replace everything between the '@' sign and the '.com' to 'mydomain'but I can't find it.Any help would be appreciated!thanks! Quote Link to comment Share on other sites More sharing options...
gluck Posted November 3, 2006 Share Posted November 3, 2006 update the column and use the regexp or substring to change the value Quote Link to comment Share on other sites More sharing options...
fenway Posted November 4, 2006 Share Posted November 4, 2006 REGEXP can't be used for anything other than matching, but REPLACE() with some LOCATE()s should work just fine. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.