If you want an exact match you either want to anchor your regex somehow (... /,$host$/... probably in this case; something like /(?:^|\D)\Q$host\E(?:\D|$)/ more generally), or split your data and test with eq.
In reply to Re: How grep IP-addresses that is an exact match?
by Fletch
in thread How grep IP-addresses that is an exact match?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |