title: Using RegularExpression for Getting Parts of IP and Port Numbers
body: <p>I am trying to use Regular Expression in C# Visual Studio 2013, I need to get a string that looks like this  192.168.1.254:65.
  What I need to do is break this string into two values an IP Address and a Port number, Everything to the left of the colon is going to be the IP Address and Everything to the right of the colon is going to be the port, I need to do this with a regular expression in C# Code. So please place any namespaces that need to be added in the code to use the regular expression in C#, Example below</p>
  
  <pre><code>string mystring = "192.168.1.254:65";
  
  string myipaddress = RegularExpressionMethod(ExpressionToGetIp, mystring);
  string myportnumber = RegularExpressionMethod(ExpressionToGetPort, mystring);
  </code></pre>
  
  <p>This has nothing to do with IPEndPoints its a general abstraction method</p>