Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Match domain names except one

by vinoth.ree (Parson)
on Feb 13, 2013 at 08:02 UTC ( #1018496=note: print w/ replies, xml ) Need Help??


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/


Comment on Re: Match domain names except one
Select or Download Code
Re^2: Match domain names except one
by Anonymous Monk on Feb 13, 2013 at 08:16 UTC
    Thanks. But we need it in a regex

      Thanks. But we need it in a regex

      Maybe you can write a regex

      What strange business requirement indicates that you "need it in a regex"?

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.

      Well then, I have some excellent news for you: /\.wt\./ is a regex.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1018496]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (14)
As of 2014-07-22 18:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (123 votes), past polls