Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I need to parse 2 words between <td> brackets: "hello" and "bye"
$text= "<td class=sp></td><td>Hello</td><td class=sp></td><td>Bye</td> +<td class=sp>"; if ($text=~ m/<\/td><td>([^ ]*)<\/./g) {print "$1\n$2\n$3";}
but I only get first one "hello" and cannot parse "bye" word.
Please help
Code and p tags added by GrandFather
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: problem with parsing
by davorg (Chancellor) on Apr 27, 2006 at 09:31 UTC | |
|
Re: problem with parsing
by marto (Cardinal) on Apr 27, 2006 at 09:30 UTC | |
|
Re: problem with parsing
by GrandFather (Saint) on Apr 27, 2006 at 09:33 UTC | |
by Anonymous Monk on Apr 27, 2006 at 09:55 UTC | |
|
Re: problem with parsing
by gellyfish (Monsignor) on Apr 27, 2006 at 10:09 UTC | |
|
Re: problem with parsing
by prasadbabu (Prior) on Apr 27, 2006 at 09:24 UTC |