Extracting subnet in php from a string
<p>I am using this code to extract the IP Address from a string:</p>

<pre><code>preg_match( '/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/', '192.168.1.1', $right)
echo $right;
</code></pre>

<p>Now if I want to extract a subnet mask from a string (like this one for example, <code>192.168.1.1/12</code>) how can I do that with pregmatch?</p>
