Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I want to get the 3-digit numbers just from BBBBB i.e. 236, 002, 121, 266.<h3>AAA 28/07/2018</h3><table><tr><td>1351</td><td>990</td><td>783</td +><td>523</td></tr></table><h3><table><tr>BBBBB 01/08/2018</h3><td>236 +</td><td>002</td><td>121</td><td>266</td></tr></table><h3>KK K P 25/0 +7/2018</h3><table><tr><td>200</td><td>3345</td><td>667</td><td>137</t +d></tr></table>
I am only getting 236 but only the other 3 sets (002, 121, 266).if ($line =~ /<h3>BBBBB .*?<td>(\d{3})<\/td>/g) { print "$1\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex help (updated)
by AnomalousMonk (Archbishop) on Aug 01, 2018 at 03:47 UTC | |
by Anonymous Monk on Aug 01, 2018 at 17:26 UTC | |
|
Re: Regex help
by jahero (Pilgrim) on Aug 01, 2018 at 07:20 UTC | |
|
Re: Regex help
by Anonymous Monk on Aug 01, 2018 at 02:44 UTC | |
by Anonymous Monk on Aug 01, 2018 at 09:07 UTC | |
|
Re: Regex help
by Anonymous Monk on Aug 01, 2018 at 14:39 UTC |