<?xml version="1.0" encoding="windows-1252"?>
<node id="1004778" title="Re: Array Filter and Lookahead" created="2012-11-20 14:06:11" updated="2012-11-20 14:06:11">
<type id="11">
note</type>
<author id="616540">
moritz</author>
<data>
<field name="doctext">
&lt;p&gt;If you really want the last integer in a string, you can find that as &lt;c&gt;/.*(?&lt;!\d)(\d+)/&lt;/c&gt;, and get the numbers as

&lt;code&gt;
my @filtered = map { /.*(?&lt;!\d)(\d+)/; $1 // '' } @lines;
&lt;/code&gt;

&lt;p&gt;However you seem to want to turn 3.0 into 3 (and not 0), and I don't know the rules behind that. Do you want to permit decimals, and cut off zero-decimals behind the dot? Or something else?&lt;/p&gt;

&lt;!-- Node text goes above. Div tags should contain sig only --&gt;
&lt;div class="pmsig"&gt;&lt;div class="pmsig-616540"&gt;
[http://perl6.org/|Perl 6 - the future is here, just unevenly distributed]
&lt;/div&gt;&lt;/div&gt;</field>
<field name="root_node">
1004756</field>
<field name="parent_node">
1004756</field>
</data>
</node>
