in reply to Match domain names except one
should not match with the string (wt)
If you do not want to match wt string directly check for unless /\.wt\./ and print.
use strict; use warnings; use utf8; while(<DATA>) { unless(/\.wt\./) { print "matches : $_\n"; } } __DATA__ 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/
In Section
Seekers of Perl Wisdom