I am using this code to extract the IP Address from a string:
preg_match( '/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/', '192.168.1.1', $right)
echo $right;
Now if I want to extract a subnet mask from a string (like this one for example, 192.168.1.1/12) how can I do that with pregmatch?
try this: