I'm trying to change a number of domain names in email addresses in a mySQL table such as
[email protected]
to something like [email protected]
Can I use a Regular Expression to do this in an update statement and if so how would I go about this?
I'm trying to change a number of domain names in email addresses in a mySQL table such as
[email protected]
to something like [email protected]
Can I use a Regular Expression to do this in an update statement and if so how would I go about this?
There's no regex replace in MySQL but you can use an UDF (User defined function) like these:
Links extracted from the answers here
No, sorry MySQL regex functionality is limited to just searching, you can't directly replace with it.
Using a UDF to give regex functionality works though, if you want to go that route -