Outline ·
[ Standard ] ·
Linear+
vb.net readLine
TSAwaN87
|
Mar 27 2015, 03:08 PM, updated 9y ago
|
Getting Started
|
Hello fellow codemaster, i have this sample text as below CODE REG 09-10-2014 11:50 _C01 000008 MEE HOON S RM3.00 MEE GORENG S RM3.00 CHICKEN RICE S RM5.50 OCEAN S RM2.00 #9557041339404 4 No GST TAX AMT RM12.74 GST 6% RM0.76 TOTAL _R_M_1_3_._5_0 CASH RM13.50 INVOICE No. 000010 REG 09-10-2014 11:50 _C01 000010 MEE HOON S RM3.00 MEE GORENG S RM3.00 2 No TOTAL _R_M_6_._0_0 VISA RM6.00 INVOICE No. 000011 REG 09-10-2014 11:50 _C01 000011 FISH S RM2.50 MILO S RM2.00 2 No TOTAL _R_M_4_._5_0 MASTER RM4.50 INVOICE No. 000012 REG 09-10-2014 11:50 _C01 000012 CHICKEN RICE S RM5.50 CORR -5.50 0 No TOTAL _R_M_0_._0_0 CASH RM0.00 INVOICE No. 000013 REG 09-10-2014 11:50 _C01 000014 MEE HOON S RM3.00 MEE GORENG S RM3.00 2 No GST TAX AMT RM5.66 GST 6% RM0.34 TOTAL _R_M_6_._0_0 CASH RM6.00 INVOICE No. 000014 REG 09-10-2014 11:50 _C01 000015 VOID ......... MEE HOON S -3.00 -1 No GST TAX AMT -2.83 GST 6% -0.17 TOTAL _-_3_._0_0 CASH -3.00 INVOICE No. 000015 REG 09-10-2014 11:50 _C01 000016 MEE HOON S RM3.00 3% DISCOUNT S -0.09 1 No GST TAX AMT RM2.75 GST 6% RM0.16 ROUNDING -0.01 TOTAL _R_M_2_._9_0 CASH RM2.90 INVOICE No. 000016
what i need is, my code to capture from "REG" line till "INVOICE NO" line how should i do it?
|
|
|
|
jam_lennon
|
Mar 30 2015, 03:42 PM
|
|
dim str as string = string.empty
do str = sr.readline loop until str is nothing
|
|
|
|
TSAwaN87
|
Mar 30 2015, 04:03 PM
|
Getting Started
|
QUOTE(jam_lennon @ Mar 30 2015, 03:42 PM) dim str as string = string.empty do str = sr.readline loop until str is nothing do you realize how many "REG" and "INVOICE" string i have?
|
|
|
|
jam_lennon
|
Mar 30 2015, 04:16 PM
|
|
to be honest, how many REG and INVOICE it is the part requires your intelligence, it has nothing to do with vb.net-readline
|
|
|
|
TSAwaN87
|
Mar 30 2015, 06:13 PM
|
Getting Started
|
QUOTE(jam_lennon @ Mar 30 2015, 04:16 PM) to be honest, how many REG and INVOICE it is the part requires your intelligence, it has nothing to do with vb.net-readline it is why i ask here. i dont have enough intel to do it but yes, i already include readline in my code but thankyou for your help
|
|
|
|
alien3d
|
Mar 30 2015, 07:31 PM
|
|
QUOTE(jam_lennon @ Mar 30 2015, 04:16 PM) to be honest, how many REG and INVOICE it is the part requires your intelligence, it has nothing to do with vb.net-readline haha he want you to give all code.dam i hate this kinda people. rm 250 to this jam then he will do it.
|
|
|
|
angch
|
Mar 30 2015, 07:54 PM
|
|
... and here I thought we're talking about libreadline in VB (Initial reaction: cool! CLI in VB...!)
/me needs to learn to read.
|
|
|
|