Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Regexp question,get 2nd match

by johngg (Abbot)
on Jul 24, 2012 at 10:15 UTC ( #983353=note: print w/replies, xml ) Need Help??


in reply to Regexp question,get 2nd match

Please clarify whether you want all the IP addresses on a line that contains an address on your 10.0.0 network or whether you only want to capture addresses on that network. Note that when you look for a line containing "10.0.0" you should quotemeta your $myip variable because the regex /10.0.0/ will also match 100000 and 10a0b0 since the dot will match any character.

Cheers,

JohnGG

Replies are listed 'Best First'.
Re^2: Regexp question,get 2nd match
by cztmonk (Monk) on Jul 24, 2012 at 10:27 UTC

    I want all IP addresses / ports who are accessing 10.0.0.z Thanks for the quotemeta tip, I did not know this one... Regards.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://983353]
help
Chatterbox?
[Corion]: Oooh. I had hoped that X::Tiny would be an X11 client or X11 server, but it is an exception framework :-)
[MidLifeXis]: How many languages would that 'Ex' alias handle. ETOOCUTE

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (11)
As of 2017-02-27 11:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (383 votes). Check out past polls.