asp.net - Regular expression for email to allow only two domain -


i have create regular expression email id this

xyz@yahoo.com , xyz@gmail.com

i need allow yahoo , gmail domain not other domain. have used expression \w+([-+.]\w+)*@yahoo.com . working fine yahoo. want include gmail also. how can modify except gmail also?

i using asp.net 2.0

replace:

yahoo\.com 

with:

(yahoo\.com|gmail\.com) 

or:

(yahoo|gmail)\.com) 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -