Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Regex to parse netstat output

by Abigail-II (Bishop)
on Feb 04, 2004 at 10:26 UTC ( #326455=note: print w/ replies, xml ) Need Help??


in reply to Regex to parse netstat output

A dot is special in a regex, and will match anything but a newline. So, it will match a digit as well, and that's what is happening here. To match a dot, either put a backslash in front of it, or write is as [.].

You also might want to use Regexp::Common and $RE{net}{IPv4} to match an ip number.

Abigail


Comment on Re: Regex to parse netstat output
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2015-07-03 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (56 votes), past polls