We want to validate input .DAT file records for provided deliminators.
In our .net application we can parse input file as per provided deliminator where all deliminator are proper , ex : "Test","data","CaseInforation"
above record/row from file will parse successfully,now we have problem with row/record formatted as below:
"Test",data,"CaseInforation" (u can see there is no text qualifier surrounded with 'data' value & because of this it creates problem while parsing data from file).
So we decided to use regular expression to find problematic value which are not surrounded with TextQualifier.
To Resolve this problem, we have created below RegEx to find problematic value, \x2C([^\x22].*?[^\x22])\x2C
using above regular expression, it works in records in between first & last fields.
"Test",data,"CaseInforation" -> Regular expression parse this records successfully & providing data as output field having problem.
"Test","data",CaseInforation -> for this record regular expression does not match last value.
can any one help us to correct Regular Expression which would match first or last value.
Thanks.