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
In reply to Re: RegEx needed
by jadev
in thread RegEx needed
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |