Firstly, IP addresses contain .s which are significant in regexps. You can avoid this issue by using \Q and \E in the regexp itself (as suggested above, but without explaining why) or quotemeta outside it.
Secondly, the problem you actually identified! Searching for "18" will match against "180", etc. This is fixed with the \b in the regexp (also suggested above) meaning word "boundary".
Hope that helps.
--
use JAPH;
print JAPH::asString();
In reply to Re: How do a make an IP look up non-greedy?
by wol
in thread How do a make an IP look up non-greedy?
by kjg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |