The second loop is executing.  The TEST statement worked.

> This will surely print out, which shows that the regex
> didn't match. In other words:
> 
>     ($cur_sym, $cur_desc, $usd_unit, $units_usd) =
>     /^([A-Z]{3})( [A-Za-z])+\s+(\d+\.\d+)\s+(\d+\.\d+)\s*$/;
> 
> Doesn't match:
> 
>     USD United States Dollars                 1.00000
> 1.00000
> 
> I can't see why not.
> 

The Currency part of the email has a fixed format that is never
deviated from:

1-3     $cur_sym
4       space
5-32    $cur_desc
33-35   (3) spaces
36-55   d8.d10 (00000000.0000000000)
56-58   (3) spaces
59-78   d8.d10 (00000000.0000000000)

I tried to shorten it to match the $cur_sym only but couldn't get it
to work.  I also tried the following:

($cur_sym, $cur_desc, $usd_unit, $units_usd) =
/^([A-Z]{3}) ([A-Za-z]{28})   (\d{7}\.\d{10})   (\d{7}\.\d{10})\s*$/;

Any suggestions?

JAck

Reply via email to