Although the Data seems to be more loosely structured, meaning there are minimum patterns/rules. We do not know the entirety of the Data knowledge.
If you could let us know if there are any Pre-Defined words that the Columns should contain, Like Maybe for the "ReferralFrom" Column where we could see AUTH PENDING, AUTH DENIED, AUTH APPROVED as Defined list of words that the Column Contains, maybe there are more but if it is a existing list that we already know, we maybe able to help you further.
In General, we would require what Could be the Column Values/Characteristics of these Column Values :
1. Date - date format (MM/dd/yyyy) 2. Reason - One Word ? 3. ReferralFrom - Defined List (Like Mentioned Above) 4. ReferralTo - Two Names separated by Comma ? 5. Speciality - Defined List ? (Sports Medici ?) 6. StartDate - Date format 7. EndDate - Dateformat 8. AllowedUsed - Number Only ? 9. Visits - Number Only ?
Maybe you could Identify the patterns present in the Data, then submit it here, we could then Check for Extraction using Regex.
However, We also request to Check from the Source of Data, If there is an alternate way of Retrieving this Data, maybe in the form of Excel/Table Extraction.
Use Build Data Table to create a data table with the correct number of columns.
Use Matches with the regex pattern above.
Use For Each to loop through the matches.
Inside the loop, use Add Data Row with the following expression in ArrayRow: m.Groups.Cast(Of Group).Skip(1).Select(Function(g) g.ToString.Trim).ToArray