For a SQL Server 2005 Instance what is the best way to take find/replace a column with multiple emails like
<JimmyTheBoot@yahoo.com>; JohnBlaze@TestMail.com; comfarmer@yahoo.com .....
and replace it with
<TestMail@yRandMail.com>; TestMail@RandMail.com; TestMail@RandMail.com .....
For testing purposes, I could think of some ways to do this in C# but I was wondering if there was a think way to do it in SQL Server, maybe with REGEX ? I want to keep the random weirdness as much as possible (some emails have brackets, some have semicolons at the end etc …)
Thanks
Here you go, you can accomplish it with a cte in a function.
It is kind of long, but here is the output.
This was lots of fun. I think that the function provided will do what you are looking for.