Dear Friends,
I am facing a challenge and I am seeking your help please as I am unable to tweak my project to work perfect, I have a long list of text which I read from a .txt file that contains repetitive pattern of announcements like the following:
Company ABC
Is selling the following scrap material
EXCAVATION MACHINE
, interested buyers can contact
17369999 or ABDULLA@CompanyABC.COM
Company GGG
Is selling the following scrap material
Coaster BUS
, interested buyers can contact
17123123 or TTT@CompanyGGG.COM
Company DDD W.L.L
And partners
Is selling the following scrap material
Boats Motors
, interested buyers can contact
175654556 or Jeff@CompanyDDD.COM
and the list goes on with hundreds of recordsâŚ
I need to capture each of the following fields in a separate data record of my database:
Company Name, Scrap Material, Telephone, Email
The way I tried to do, is that I made a loop to go through every 5 lines, and combine them on one text line using CombinText Function, and then I use Regext to extract the fields and save them to the database. The problem I am facing is when I run into more than 5 lines, say 6 or 7? As the loop will not help here. (Plz see the last records which contains 6 lines).
Do you suggest a better approach? Or is there a way you to tweak the loop to handle 6 or more lines. (it might help to note that the last line will always contains an email address, it might end with .com, .net or .inâŚ.etc).
Appreciate your help please.
Thanks

