Based on this answer... http://stackoverflow.com/questions/201323/what-is-the-best-regular-expression-for-validating-email-addresses/201378#201378
Which led me to this site... http://fightingforalostcause.net/misc/2006/compare-email-regex.php
Benim ASP.NET MVC app için e-posta doğrulama için bu regex kullanmak istiyorum:
/^[-_a-z0-9\'+*$^&%=~!?{}]++(?:\.[-_a-z0-9\'+*$^&%=~!?{}]+)*+@(?:(?![-.])[-a-z0-9.]+(?<![-.])\.[a-z]{2,6}|\d{1,3}(?:\.\d{1,3}){3})(?::\d++)?$/iD
Ne yazık ki, bu hatayı alıyorum
System.ArgumentException was unhandled by user code Message="parsing \"/^[-_a-z0-9\'+*$^&%=~!?{}]++(?:\.[-_a-z0-9\'+$^&%=~!?{}]+)+@(?:(?![-.])[-a-z0-9.]+(?
Hiç kimse bu. NET'in Regex
sınıf tarafından kullanılabilir olması için dönüştürülür, ya da başka bir de yoktur. PHP'nin preg_match
fonksiyonu ile daha iyi bir uyum NET düzenli ifade class?