in reply to How do a make an IP look up non-greedy?
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();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How do a make an IP look up non-greedy?
by AnomalousMonk (Archbishop) on Jun 16, 2009 at 11:53 UTC |