I have a text table with the following columns
Minutes
Item#
Day
Date
Time
Number
CallTo
RateCode
RatePd
Feature
AirCharge
AddCharge
Total Charge
Here is my problem, not every record will have information for every column.
since this is a text table it is pushed together likes so
min item# day date time number callto ratecode ratepd feature airchg addchg
ttlchg
1 10 FRI 09/05 7:56PM Incomi Cl 5KNW DT M2MC 0.00 0.00 0.00
1 9 09/05 7:58PM Incomi CL 5KNW DT 0.00
so as you can see the first row has all the information and is easy to match
using the following pattern
"(?<Minutes>(\d+))\s*(?<Item>(\d+))\s*(?<Day>(MON| TUE|WED|THU|FRI|SAT))\s*(?<Date>(\d+/\d+))\s*(?<Time>(\d+:\d+\w+))\s*(?<Number>(\d+-\d+-\d+))\s*(?<Callto>(\w+\s\w+))\s*(?<RateCode>(5KNW| 7ESM|FN4N|7RM6))\S*(?<RatePd>(DT|NW))\s*(?<Feautre >(M2MC|VM|CW))\s*(?<AirCharge>(\d+\.\d+))\s*(?<Add Charge>(\d+\.\d+))\s*(?<TotalCharge>(\d+\.\d+))"
but the second row does not have all of the information there so it is hard
to get the information that i need
So i was wondering if anyone knew of a way that i could make a pattern that
is similiar to the pattern that i have above but will skip over a group if
that info is not that and basically return a null value or something so that
i can get the data that i need from every row in this table. I have to add
this data to a database and this is the only format that i can get cingular
to give me this info in.
Thanks Again.
WStoreyII