Click here to Skip to main content
15,886,519 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am getting email id from database but in database some email address are not in correct format. There are millions of record so I cant check every emailID. some emailID has space in last. some has \n character. so I want to how to identify those type of characters with emailID and remove junk characters and get correct emailid value?

Plz help me..

What I have tried:

Select * from table where [EmailID] like '[a-z,0-9,_,-]%@[a-z,0-9,_,-]%.[a-z][a-z]%'

I have tried it but my problem is not solved
Posted
Updated 6-Jun-17 2:27am
Comments
ZurdoDev 6-Jun-17 7:46am    
I guess you'll have to find a regex code that does work.
heta.dave 6-Jun-17 7:47am    
regex code in sql server?

1 solution

Try this

SELECT * FROM users WHERE email NOT LIKE '_%@__%.__%'
 
Share this answer
 
Comments
heta.dave 6-Jun-17 11:07am    
I try it but having same problem.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900