dogen has asked for the wisdom of the Perl Monks concerning the following question:
What I need is to find the Transaction # and grab it to save to the record. What I have been trying (well, the latest version anyway) is:... <tr> <td class="order2" width="266"><p>Transaction Number:</p> </td> <td class="order3" width="324">V64F66697601</td> </tr> ...
What happens is that it comes back as matching but it doesn't grab $1, its just blank. It looks like the first ".*" matches everything to the end of the html response. Does anyone have a suggestion as to how the regex should be set up?... my $order_reg = "<p>Transaction Number:<\/p>\n.*<\/td>\n.*<td .*>(.*)< +\/td>"; if ($request->content =~ /$order_reg/s) { print "\nmatched $1\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Multiple line regex match
by edan (Curate) on Nov 29, 2004 at 15:12 UTC | |
by dogen (Acolyte) on Nov 29, 2004 at 15:33 UTC | |
|
Re: Multiple line regex match
by gaal (Parson) on Nov 29, 2004 at 15:17 UTC | |
|
Re: Multiple line regex match
by Fletch (Bishop) on Nov 29, 2004 at 15:15 UTC | |
|
Re: Multiple line regex match
by ikegami (Patriarch) on Nov 29, 2004 at 16:59 UTC |