Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^2: Regex Question

by clegane (Novice)
on Sep 10, 2013 at 18:28 UTC ( [id://1053331]=note: print w/replies, xml ) Need Help??


in reply to Re: Regex Question
in thread Regex Question

This is close. I should have pointed out that each cell can contain multiple lines. The sample text I posted was one cell. I'm having trouble with greediness/unknown numbers of occurrences in a single line. One line might contain

something, Protocol: UDP, something, Destination Port: x-y, something, something, Protocol: TCP, something, Destination Port: a-b, something

I need to extract each protocol/port pair into an array, and there's an unknown number. Protocol always comes before port, but not always immediately.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2024-04-24 10:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found