Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Regular expression assistance

by DanEllison (Beadle)
on Dec 07, 2012 at 16:08 UTC ( #1007772=note: print w/ replies, xml ) Need Help??


in reply to Regular expression assistance

Assuming $cdp is piped into perl, try:

while (<>) { if (/Native VLAN ID \(0x0a\), length: (\d+) bytes: (\d+)/ +) { print "$2\n"; }}


Comment on Re: Regular expression assistance
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (19)
As of 2015-07-28 20:45 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 (258 votes), past polls