in reply to Re: classifying data
in thread classifying data

This seems to accept 123456,123.00.

Be well.

Replies are listed 'Best First'.
Re: Re: Re: classifying data
by paulbort (Hermit) on Jan 19, 2004 at 23:43 UTC
    Easily fixed, just give the first digit group an explicit count:
    \d{1,3} # at least one digit


    --
    Spring: Forces, Coiled Again!
Re: Re: Re: classifying data
by halley (Prior) on Jan 20, 2004 at 03:42 UTC
    Yes, \d+(,\d{3})* will accept "123456,123.00". Perl accepts 123456_123.00 as one number, also. If you wish not to be so accepting, then you may have to deal with more than two choices in the key alternation. The suggested expression \d{1,3}(,\d{3})* would reject "123456123.00", since it lacks commas.

    --
    [ e d @ h a l l e y . c c ]