MS SQL Code and Regex

Larry Brister
Larry Brister used Ask the Experts™
I would like to do a function in SQL that uses a regex string to validate email addresses and which also is not going to bog things down.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Doug BishopDatabase Developer

SELECT * FROM myTable WHERE email LIKE '[a-z,0-9,_,-]%@[a-z,0-9,_,-]%.[a-z][a-z]%'
Database Developer
Here is another one (not mine) that will likely do a better job.
Larry Bristersr. Developer


Perfect... thanks

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial