Hello Jenda,

I am getting weak on regex.

Could you please break this down for me        /(.*?-?\d+(?:\.\d+)?)/g

That is:

my @last_line = ($report[-1] =~ /(.*?-?\d+(?:\.\d+)?)/g); # split the last
line into fields (including spaces!)


Also, why did you use  $report[-1] instead of $report[$#report]?

Thank you


PS:  Assuming the data is:

6         Z.1, March 4, 2004
_____________________________________________________________________________________________
D.1 Debt Growth by Sector\203^G\202\201\205^K 1
In percent; quarterly figures are seasonally adjusted annual rates
---------------------------------------------------------------------------------------------

                   -----------------------------Domestic nonfinancial
sectors----------------

-----------------------------Nonfederal----------------
                                                  -------Households--------
----Business----
                           Federal      Total              Home    Consumer
                   Total  government  nonfederal  Total  mortgage   credit
Total  Corporate
_____________________________________________________________________________________________

1969                 7.2        -1.1         9.7    7.7       7.0       8.3
11.6       11.4
1970                 6.9         4.2         7.6    4.4       4.4       3.4
10.3       12.9
1971                 9.5         8.3         9.8    9.2       8.5      11.7
10.1        7.8
1972                10.0         4.6        11.4   11.3      11.2      13.1
12.5        9.9
1973                10.7         2.0        12.9   12.4      11.7      13.3
14.7       17.5
1974                 9.2         3.4        10.5    8.8       9.7       4.6
13.0       11.5
_____________________________________________________________________________________________




__________________

William Ampeh (x3939)
Federal Reserve Board


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to