"There are many URL's but we should not match with the string (wt)."
The following solves your problem - as stated.
$ perl -Mstrict -Mwarnings -E ' my @urls = qw{ https://www.abc.com.wi.pr.com/ https://www.abc.com/ https://www.def.com.wi.pr.com/ https://www.wt.com.wi.pr.com/ }; for (@urls) { say unless /wt/; } ' https://www.abc.com.wi.pr.com/ https://www.abc.com/ https://www.def.com.wi.pr.com/
I suspect your problem is more complex. If so, please provide more complete details of your requirements; if not, enjoy. :-)
-- Ken
In reply to Re: Match domain names except one
by kcott
in thread Match domain names except one
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |