Thursday, July 18, 2019

Validate Website URL in C#

public Boolean website(string str)
  {

   if (Regex.IsMatch(str, @"^[a-zA-Z0-9\-\.]+\.(com|org|net|mil|edu|COM|ORG|NET|MIL|EDU)$"))
   {
    return true;
   }
   else
   {
    return false;
   }
        
  }

No comments:

Post a Comment

Lab 09: Publish and subscribe to Event Grid events

  Microsoft Azure user interface Given the dynamic nature of Microsoft cloud tools, you might experience Azure UI changes that occur after t...