in reply to Regex Question
push @svcDesc, "$1:$2" while ($htmlStream->get_trimmed_text('/td') =~
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
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.
I've got the following going, but it's only getting the first match. If I remove the '?', it only grabs the last match. I need it to get them all. Adding a 'g' at the end doesn't seem to help
There is no Extraterrestrial life
There aren't any suitably capable Extraterrestrials
Interstellar travel is too difficult
We're too uncool / not worth the trouble
What do you mean they haven't visited?
Results (552 votes). Check out past polls.