in reply to RegEx needed
This matches only IP addresses. There's one caveat: 0.0.0.0 is matched too.
Use it like this:
if ($oid =~ /^(?:\d+\.)+\d+$/ and $oid !~ /^$ip_pattern$/o) { blah blah blah }
janitored by ybiC: Balanced <code> tags around code sample, as per Monastery convention
|
|---|