kiran kumar
10th January 2013, 10:53
Hi team,
I am not able to separate those fields since the separator space is not fixed and its not fixed length lines, also there is thousand separator comma (,) which is not allowing me to convert in numbers with below sample data.
Can any one help?
Sample data
-------------
A1 CAM (79A) ZING- 1XSAND 6 163,668.00 982,008.007915PPC
B1 SAM (698) TROU - 2.40G/ 6 Nos 75,079.00 450,474.0069Y5PPC
C1 JAN (497) MOE GB (2GB 432 Nos 4,753.00 199,626.0049YPPC
D1 PAN (90Y) OON 3GB SFF 2 Nos 7,092.00 85,104.0090Y8PPC
E1 CAN (81U) 1 7.K 6S NL 36 Nos 12,513.00 450,468.0081Y9PPD
F1 TAN (46M) SAS HBA 12 Nos 7,352.00 88,224.0046M0PPJ
For example-
Here last 7 characters are item code (7915PPC), before that item value (982,008.00), before that item price (163,668.00) and before that qty (6).
I just need last 4-5 fields, also for first record unit (Nos) is not there.
Note: Tried with string.scan() but not getting the expected result.
I am not able to separate those fields since the separator space is not fixed and its not fixed length lines, also there is thousand separator comma (,) which is not allowing me to convert in numbers with below sample data.
Can any one help?
Sample data
-------------
A1 CAM (79A) ZING- 1XSAND 6 163,668.00 982,008.007915PPC
B1 SAM (698) TROU - 2.40G/ 6 Nos 75,079.00 450,474.0069Y5PPC
C1 JAN (497) MOE GB (2GB 432 Nos 4,753.00 199,626.0049YPPC
D1 PAN (90Y) OON 3GB SFF 2 Nos 7,092.00 85,104.0090Y8PPC
E1 CAN (81U) 1 7.K 6S NL 36 Nos 12,513.00 450,468.0081Y9PPD
F1 TAN (46M) SAS HBA 12 Nos 7,352.00 88,224.0046M0PPJ
For example-
Here last 7 characters are item code (7915PPC), before that item value (982,008.00), before that item price (163,668.00) and before that qty (6).
I just need last 4-5 fields, also for first record unit (Nos) is not there.
Note: Tried with string.scan() but not getting the expected result.