IP Address Validation with REGEX

Perşembe, Eylül 17th, 2009 @ 15:09

You can use REGEX control below;


"^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$"

For using this code in Windows Applications;

    string text = "127.0.0.1";
    string regex= @"^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$";
    Regex regexCheck = new Regex(regex);
    bool valid = regexCheck.IsMatch(text, 0);

İlişkili Yazılar :

  1. Biztalk : WCF-Custom SQLBinding Address Format
  2. Machinarium Hileleri
  3. Bing e Sitenizi Kaydedin!!!
  4. SQL Connection String (Eng)
  5. Hisse Takip Programı
  6. Windows 7 Gadgets Sorunu
  7. Google Translate Kullanarak .NeT de Dil Çevrimi
  8. InfoPath Errors
  9. Diablo III
  10. Mail Gönderme C# Kodu // Send Mail C# Code

Tags: , ,
Posted in Yazılım | No Comments »

Önceki Yazı << Sonraki Yazı >>

Leave a Reply



Yeni yorumları e-posta aracılığıyla bana bildir. Ayrıca yorum yapmadan da abone olabilirsiniz.