bluestars
08-19-2007, 02:23 AM
Hello all. I just recently began my foray into the world of perl. I was lured in by LWP, to be honest. Why can't PHP have something like that?
Anyway, here's my goal. I've got a string (in $response->decoded_content), and a rexex (/([0-9,]*)g<\/td><td><a href="id=([0-9]*)&"/g; (Okay, so that's not the real regex, but it has the key features: the capture groups.)
There are 20-ish instances of this pattern in my string. I would like to end up with two arrays (@one and @two, let's call them), each containing the data from each capture group.
Any idea on how to do this?
Anyway, here's my goal. I've got a string (in $response->decoded_content), and a rexex (/([0-9,]*)g<\/td><td><a href="id=([0-9]*)&"/g; (Okay, so that's not the real regex, but it has the key features: the capture groups.)
There are 20-ish instances of this pattern in my string. I would like to end up with two arrays (@one and @two, let's call them), each containing the data from each capture group.
Any idea on how to do this?