Paul Kraus wrote:
> Expression
> /Sales - Freight - Leimkuehler\s+(\d+,?\d+\.?\d+)/
> 
> String
> 410-02-00        Sales - Freight - Leimkuehler
> 6.96
> 
> It does match if I remove everything after Leimkuehler.
> This is how it reads to me
> 
> 1 or more spaces
> Open paren to save value to $1
> 1 or more digits
> Maybe a comma but not necessary
> 1 or more digits
> Maybe a period but its not necessary.
> 1 or more digits
> 
> I am assuming my the problem is with ,? But I don't understand why.

        I don't usually use ? but use {} to identify how many times this can appear. 
So Ichanged your code to:

/Sales - Freight - Leimkuehler\s+((\d+){0,}\d+\.\d{0,})/
                which says (\d+){0,} there can zero groups with commas or 1 or more
                \d+\. says numbers with a decimal point
                \d{0,} says appears 0 or more times.  If only want 0(ie no digits 
right of decimal point or up to say 2 decimal points(ie, 6.3 or 6.30) then change to 
0,2 vs 0,

        Just one way to try it.

Wags ;)


**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to